Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
73aed6f9
Commit
73aed6f9
authored
Jun 14, 2024
by
张森
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定时任务问题处理
parent
cbc95105
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
+19
-5
PlanTaskMapper.java
...ejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
+3
-0
JobService.java
.../main/java/com/yeejoin/amos/patrol/quartz/JobService.java
+5
-5
dbTemplate_plan_task.xml
...rol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+11
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/PlanTaskMapper.java
View file @
73aed6f9
...
...
@@ -33,6 +33,9 @@ public interface PlanTaskMapper extends BaseMapper {
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getPlanTaskInfo
(
PlanTaskPageParam
params
);
List
<
PlanTask
>
findAllByFinishStatusIn
(
@Param
(
"ids"
)
List
<
Integer
>
finishStatus
);
/**
* 批量删除
* @param strArry
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/quartz/JobService.java
View file @
73aed6f9
...
...
@@ -109,14 +109,14 @@ public class JobService implements IJobService {
@Override
@Transactional
//
@Transactional
public
void
initScheduler
()
{
// TODO Auto-generated method stub
log
.
debug
(
"======================initScheduler==========================="
);
// 已持久化到数据库,所以不需要这儿初始化
//
initTaskJob();
//
initPlanTaskJob();
//
initMsgJob();
initTaskJob
();
initPlanTaskJob
();
initMsgJob
();
}
@Override
...
...
@@ -157,7 +157,7 @@ public class JobService implements IJobService {
List
<
Integer
>
statusList
=
new
ArrayList
<
Integer
>();
statusList
.
add
(
PlanTaskFinishStatusEnum
.
NOTSTARTED
.
getValue
());
statusList
.
add
(
PlanTaskFinishStatusEnum
.
UNDERWAY
.
getValue
());
List
<
PlanTask
>
planTaskList
=
iPlanTaskDao
.
findAllByFinishStatusIn
(
statusList
);
List
<
PlanTask
>
planTaskList
=
planTaskMapper
.
findAllByFinishStatusIn
(
statusList
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
planTaskList
.
forEach
(
planTask
->
{
try
{
...
...
amos-boot-system-patrol/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
73aed6f9
...
...
@@ -1130,4 +1130,14 @@
and finish_status in (0,1)
and status = 0
</select>
<select
id=
"findAllByFinishStatusIn"
resultType=
"com.yeejoin.amos.patrol.dao.entity.PlanTask"
>
select * from p_plan_task where finish_status in
<foreach
item=
"id"
collection=
"ids"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
and plan_id in
(select id from p_plan where is_delete = 0 and status = 0)
</select>
</mapper>
\ No newline at end of file
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