Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
sts网站
Commits
0fc266fe
Commit
0fc266fe
authored
Aug 24, 2021
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时任务对检查异常进行事务回滚
parent
d1ef19f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
SysJobServiceImpl.java
...java/com/ruoyi/quartz/service/impl/SysJobServiceImpl.java
+8
-8
No files found.
ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/SysJobServiceImpl.java
View file @
0fc266fe
...
@@ -75,7 +75,7 @@ public class SysJobServiceImpl implements ISysJobService
...
@@ -75,7 +75,7 @@ public class SysJobServiceImpl implements ISysJobService
* @param job 调度信息
* @param job 调度信息
*/
*/
@Override
@Override
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
pauseJob
(
SysJob
job
)
throws
SchedulerException
public
int
pauseJob
(
SysJob
job
)
throws
SchedulerException
{
{
Long
jobId
=
job
.
getJobId
();
Long
jobId
=
job
.
getJobId
();
...
@@ -95,7 +95,7 @@ public class SysJobServiceImpl implements ISysJobService
...
@@ -95,7 +95,7 @@ public class SysJobServiceImpl implements ISysJobService
* @param job 调度信息
* @param job 调度信息
*/
*/
@Override
@Override
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
resumeJob
(
SysJob
job
)
throws
SchedulerException
public
int
resumeJob
(
SysJob
job
)
throws
SchedulerException
{
{
Long
jobId
=
job
.
getJobId
();
Long
jobId
=
job
.
getJobId
();
...
@@ -115,7 +115,7 @@ public class SysJobServiceImpl implements ISysJobService
...
@@ -115,7 +115,7 @@ public class SysJobServiceImpl implements ISysJobService
* @param job 调度信息
* @param job 调度信息
*/
*/
@Override
@Override
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
deleteJob
(
SysJob
job
)
throws
SchedulerException
public
int
deleteJob
(
SysJob
job
)
throws
SchedulerException
{
{
Long
jobId
=
job
.
getJobId
();
Long
jobId
=
job
.
getJobId
();
...
@@ -135,7 +135,7 @@ public class SysJobServiceImpl implements ISysJobService
...
@@ -135,7 +135,7 @@ public class SysJobServiceImpl implements ISysJobService
* @return 结果
* @return 结果
*/
*/
@Override
@Override
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteJobByIds
(
Long
[]
jobIds
)
throws
SchedulerException
public
void
deleteJobByIds
(
Long
[]
jobIds
)
throws
SchedulerException
{
{
for
(
Long
jobId
:
jobIds
)
for
(
Long
jobId
:
jobIds
)
...
@@ -151,7 +151,7 @@ public class SysJobServiceImpl implements ISysJobService
...
@@ -151,7 +151,7 @@ public class SysJobServiceImpl implements ISysJobService
* @param job 调度信息
* @param job 调度信息
*/
*/
@Override
@Override
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
changeStatus
(
SysJob
job
)
throws
SchedulerException
public
int
changeStatus
(
SysJob
job
)
throws
SchedulerException
{
{
int
rows
=
0
;
int
rows
=
0
;
...
@@ -173,7 +173,7 @@ public class SysJobServiceImpl implements ISysJobService
...
@@ -173,7 +173,7 @@ public class SysJobServiceImpl implements ISysJobService
* @param job 调度信息
* @param job 调度信息
*/
*/
@Override
@Override
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
run
(
SysJob
job
)
throws
SchedulerException
public
void
run
(
SysJob
job
)
throws
SchedulerException
{
{
Long
jobId
=
job
.
getJobId
();
Long
jobId
=
job
.
getJobId
();
...
@@ -191,7 +191,7 @@ public class SysJobServiceImpl implements ISysJobService
...
@@ -191,7 +191,7 @@ public class SysJobServiceImpl implements ISysJobService
* @param job 调度信息 调度信息
* @param job 调度信息 调度信息
*/
*/
@Override
@Override
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
insertJob
(
SysJob
job
)
throws
SchedulerException
,
TaskException
public
int
insertJob
(
SysJob
job
)
throws
SchedulerException
,
TaskException
{
{
job
.
setStatus
(
ScheduleConstants
.
Status
.
PAUSE
.
getValue
());
job
.
setStatus
(
ScheduleConstants
.
Status
.
PAUSE
.
getValue
());
...
@@ -209,7 +209,7 @@ public class SysJobServiceImpl implements ISysJobService
...
@@ -209,7 +209,7 @@ public class SysJobServiceImpl implements ISysJobService
* @param job 调度信息
* @param job 调度信息
*/
*/
@Override
@Override
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
updateJob
(
SysJob
job
)
throws
SchedulerException
,
TaskException
public
int
updateJob
(
SysJob
job
)
throws
SchedulerException
,
TaskException
{
{
SysJob
properties
=
selectJobById
(
job
.
getJobId
());
SysJob
properties
=
selectJobById
(
job
.
getJobId
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment