From 3f8fd0a0f8edd90dce0349cf4c9c975905f1ab2d Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 24 Aug 2021 11:19:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E5=AF=B9?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E5=BC=82=E5=B8=B8=E8=BF=9B=E8=A1=8C=E4=BA=8B?= =?UTF-8?q?=E5=8A=A1=E5=9B=9E=E6=BB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/job/service/SysJobServiceImpl.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/service/SysJobServiceImpl.java b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/service/SysJobServiceImpl.java index 4699b3ddd..3ac346261 100644 --- a/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/service/SysJobServiceImpl.java +++ b/ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/service/SysJobServiceImpl.java @@ -74,7 +74,7 @@ public class SysJobServiceImpl implements ISysJobService * @param job 调度信息 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int pauseJob(SysJob job) throws SchedulerException { Long jobId = job.getJobId(); @@ -94,7 +94,7 @@ public class SysJobServiceImpl implements ISysJobService * @param job 调度信息 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int resumeJob(SysJob job) throws SchedulerException { Long jobId = job.getJobId(); @@ -114,7 +114,7 @@ public class SysJobServiceImpl implements ISysJobService * @param job 调度信息 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int deleteJob(SysJob job) throws SchedulerException { Long jobId = job.getJobId(); @@ -134,7 +134,7 @@ public class SysJobServiceImpl implements ISysJobService * @return 结果 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public void deleteJobByIds(Long[] jobIds) throws SchedulerException { for (Long jobId : jobIds) @@ -150,7 +150,7 @@ public class SysJobServiceImpl implements ISysJobService * @param job 调度信息 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int changeStatus(SysJob job) throws SchedulerException { int rows = 0; @@ -172,7 +172,7 @@ public class SysJobServiceImpl implements ISysJobService * @param job 调度信息 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public void run(SysJob job) throws SchedulerException { Long jobId = job.getJobId(); @@ -190,7 +190,7 @@ public class SysJobServiceImpl implements ISysJobService * @param job 调度信息 调度信息 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int insertJob(SysJob job) throws SchedulerException, TaskException { job.setStatus(ScheduleConstants.Status.PAUSE.getValue()); @@ -208,7 +208,7 @@ public class SysJobServiceImpl implements ISysJobService * @param job 调度信息 */ @Override - @Transactional + @Transactional(rollbackFor = Exception.class) public int updateJob(SysJob job) throws SchedulerException, TaskException { SysJob properties = selectJobById(job.getJobId());