From 3b799ee4d1090c6bbe7d7486f3e1300a300b9bec Mon Sep 17 00:00:00 2001 From: stone <827672943@qq.com> Date: Tue, 30 May 2023 16:10:11 +0800 Subject: [PATCH] 111 --- .../java/com/psdc/service/impl/PsdcTimerServiceImpl.java | 4 +++- .../src/main/resources/mapper/business/PsdcTimerMapper.xml | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/psdc-business/src/main/java/com/psdc/service/impl/PsdcTimerServiceImpl.java b/psdc-business/src/main/java/com/psdc/service/impl/PsdcTimerServiceImpl.java index 5d58b98..3266f02 100644 --- a/psdc-business/src/main/java/com/psdc/service/impl/PsdcTimerServiceImpl.java +++ b/psdc-business/src/main/java/com/psdc/service/impl/PsdcTimerServiceImpl.java @@ -231,7 +231,9 @@ public class PsdcTimerServiceImpl implements IPsdcTimerService { psdcTimer.setJobId(job1.getJobId().intValue()); psdcTimer.setTimerStatus(Integer.valueOf(job1.getStatus())); psdcTimer.setCreateBy(SecurityUtils.getUsername()); - return psdcTimerMapper.insert(psdcTimer); + psdcTimerMapper.insert(psdcTimer); + Integer timerId = psdcTimer.getTimerId(); + return updateStatus(timerId,0); } catch (SchedulerException e) { throw new RuntimeException(e); } catch (TaskException e) { diff --git a/psdc-business/src/main/resources/mapper/business/PsdcTimerMapper.xml b/psdc-business/src/main/resources/mapper/business/PsdcTimerMapper.xml index 5562d67..29ef683 100644 --- a/psdc-business/src/main/resources/mapper/business/PsdcTimerMapper.xml +++ b/psdc-business/src/main/resources/mapper/business/PsdcTimerMapper.xml @@ -94,9 +94,9 @@ - - insert into psdc_timer(device_id,user_id,runday,runtime,control_key,control_context,control_value,cron_text,job_id,timer_status,create_by,create_time) - values (#{deviceId},#{userId},#{runday},#{runtime},#{controlKey},#{controlContext},#{controlValue},#{cronText},#{jobId},#{timerStatus},#{createBy},sysdate()) + + insert into psdc_timer(timer_id,device_id,user_id,runday,runtime,control_key,control_context,control_value,cron_text,job_id,timer_status,create_by,create_time) + values (#{timerId},#{deviceId},#{userId},#{runday},#{runtime},#{controlKey},#{controlContext},#{controlValue},#{cronText},#{jobId},#{timerStatus},#{createBy},sysdate())