mirror of https://gitee.com/y_project/RuoYi.git
定时任务对检查异常进行事务回滚
parent
8f1f47e60e
commit
44cb080932
|
@ -77,7 +77,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();
|
||||
|
@ -97,7 +97,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();
|
||||
|
@ -117,7 +117,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();
|
||||
|
@ -137,7 +137,7 @@ public class SysJobServiceImpl implements ISysJobService
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteJobByIds(String ids) throws SchedulerException
|
||||
{
|
||||
Long[] jobIds = Convert.toLongArray(ids);
|
||||
|
@ -154,7 +154,7 @@ public class SysJobServiceImpl implements ISysJobService
|
|||
* @param job 调度信息
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int changeStatus(SysJob job) throws SchedulerException
|
||||
{
|
||||
int rows = 0;
|
||||
|
@ -176,7 +176,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();
|
||||
|
@ -193,7 +193,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());
|
||||
|
@ -211,7 +211,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());
|
||||
|
|
Loading…
Reference in New Issue