Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
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
pseer
gxpt_ht
Commits
135c8c96
Commit
135c8c96
authored
Nov 18, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
32bd89b9
4f516337
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
258 additions
and
169 deletions
+258
-169
JobErrorLogController.java
...va/share/web/controller/system/JobErrorLogController.java
+36
-36
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+91
-28
JobErrorLog.java
...system/src/main/java/share/system/domain/JobErrorLog.java
+8
-4
JobErrorLogMapper.java
.../src/main/java/share/system/mapper/JobErrorLogMapper.java
+23
-23
JobErrorLogService.java
...rc/main/java/share/system/service/JobErrorLogService.java
+25
-25
JobErrorLogServiceImpl.java
...ava/share/system/service/impl/JobErrorLogServiceImpl.java
+36
-35
JobErrorLogMapper.xml
...em/src/main/resources/mapper/system/JobErrorLogMapper.xml
+39
-18
No files found.
share-admin/src/main/java/share/web/controller/system/
SysJob
LogController.java
→
share-admin/src/main/java/share/web/controller/system/
JobError
LogController.java
View file @
135c8c96
...
@@ -9,89 +9,89 @@ import share.common.core.domain.AjaxResult;
...
@@ -9,89 +9,89 @@ import share.common.core.domain.AjaxResult;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.
SysJob
Log
;
import
share.system.domain.
JobError
Log
;
import
share.system.service.
SysJob
LogService
;
import
share.system.service.
JobError
LogService
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 定时任务日志Controller
* 定时任务
异常
日志Controller
*
*
* @author wuwenlong
* @author wuwenlong
* @date 2024-11-1
5
* @date 2024-11-1
8
*/
*/
@RestController
@RestController
@RequestMapping
(
"/system/
sysJob
Log"
)
@RequestMapping
(
"/system/
jobError
Log"
)
public
class
SysJob
LogController
extends
BaseController
{
public
class
JobError
LogController
extends
BaseController
{
@Autowired
@Autowired
private
SysJobLogService
sysJob
LogService
;
private
JobErrorLogService
jobError
LogService
;
/**
/**
* 查询定时任务日志列表
* 查询定时任务
异常
日志列表
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:
sysJob
Log:list')"
)
@PreAuthorize
(
"@ss.hasPermi('system:
jobError
Log:list')"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SysJobLog
sysJob
Log
)
{
public
TableDataInfo
list
(
JobErrorLog
jobError
Log
)
{
startPage
();
startPage
();
List
<
SysJobLog
>
list
=
sysJobLogService
.
selectSysJobLogList
(
sysJob
Log
);
List
<
JobErrorLog
>
list
=
jobErrorLogService
.
selectJobErrorLogList
(
jobError
Log
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
/**
/**
* 导出定时任务日志列表
* 导出定时任务
异常
日志列表
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:
sysJob
Log:export')"
)
@PreAuthorize
(
"@ss.hasPermi('system:
jobError
Log:export')"
)
@Log
(
title
=
"定时任务日志"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"定时任务
异常
日志"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SysJobLog
sysJob
Log
)
{
public
void
export
(
HttpServletResponse
response
,
JobErrorLog
jobError
Log
)
{
List
<
SysJobLog
>
list
=
sysJobLogService
.
selectSysJobLogList
(
sysJob
Log
);
List
<
JobErrorLog
>
list
=
jobErrorLogService
.
selectJobErrorLogList
(
jobError
Log
);
ExcelUtil
<
SysJobLog
>
util
=
new
ExcelUtil
<
SysJobLog
>(
SysJob
Log
.
class
);
ExcelUtil
<
JobErrorLog
>
util
=
new
ExcelUtil
<
JobErrorLog
>(
JobError
Log
.
class
);
util
.
exportExcel
(
response
,
list
,
"定时任务日志数据"
);
util
.
exportExcel
(
response
,
list
,
"定时任务
异常
日志数据"
);
}
}
/**
/**
* 获取定时任务日志详细信息
* 获取定时任务
异常
日志详细信息
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:
sysJob
Log:query')"
)
@PreAuthorize
(
"@ss.hasPermi('system:
jobError
Log:query')"
)
@GetMapping
(
value
=
"/{jobLogId}"
)
@GetMapping
(
value
=
"/{jobLogId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"jobLogId"
)
Long
jobLogId
)
{
public
AjaxResult
getInfo
(
@PathVariable
(
"jobLogId"
)
Long
jobLogId
)
{
return
success
(
sysJobLogService
.
selectSysJob
LogByJobLogId
(
jobLogId
));
return
success
(
jobErrorLogService
.
selectJobError
LogByJobLogId
(
jobLogId
));
}
}
/**
/**
* 新增定时任务日志
* 新增定时任务
异常
日志
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:
sysJob
Log:add')"
)
@PreAuthorize
(
"@ss.hasPermi('system:
jobError
Log:add')"
)
@Log
(
title
=
"定时任务日志"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"定时任务
异常
日志"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
@PostMapping
public
AjaxResult
add
(
@RequestBody
SysJobLog
sysJob
Log
)
{
public
AjaxResult
add
(
@RequestBody
JobErrorLog
jobError
Log
)
{
return
toAjax
(
sysJobLogService
.
insertSysJobLog
(
sysJob
Log
));
return
toAjax
(
jobErrorLogService
.
insertJobErrorLog
(
jobError
Log
));
}
}
/**
/**
* 修改定时任务日志
* 修改定时任务
异常
日志
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:
sysJob
Log:edit')"
)
@PreAuthorize
(
"@ss.hasPermi('system:
jobError
Log:edit')"
)
@Log
(
title
=
"定时任务日志"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"定时任务
异常
日志"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SysJobLog
sysJob
Log
)
{
public
AjaxResult
edit
(
@RequestBody
JobErrorLog
jobError
Log
)
{
return
toAjax
(
sysJobLogService
.
updateSysJobLog
(
sysJob
Log
));
return
toAjax
(
jobErrorLogService
.
updateJobErrorLog
(
jobError
Log
));
}
}
/**
/**
* 删除定时任务日志
* 删除定时任务
异常
日志
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:
sysJob
Log:remove')"
)
@PreAuthorize
(
"@ss.hasPermi('system:
jobError
Log:remove')"
)
@Log
(
title
=
"定时任务日志"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"定时任务
异常
日志"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{jobLogIds}"
)
@DeleteMapping
(
"/{jobLogIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
jobLogIds
)
{
public
AjaxResult
remove
(
@PathVariable
Long
[]
jobLogIds
)
{
return
toAjax
(
sysJobLogService
.
deleteSysJob
LogByJobLogIds
(
jobLogIds
));
return
toAjax
(
jobErrorLogService
.
deleteJobError
LogByJobLogIds
(
jobLogIds
));
}
}
@DeleteMapping
(
"/clean"
)
@DeleteMapping
(
"/clean"
)
public
AjaxResult
clean
()
{
public
AjaxResult
clean
()
{
sysJob
LogService
.
cleanJobLog
();
jobError
LogService
.
cleanJobLog
();
return
success
();
return
success
();
}
}
}
}
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
135c8c96
...
@@ -122,7 +122,7 @@ public class RedisTask {
...
@@ -122,7 +122,7 @@ public class RedisTask {
private
ConsumerSecondaryCardService
consumerSecondaryCardService
;
private
ConsumerSecondaryCardService
consumerSecondaryCardService
;
@Autowired
@Autowired
private
SysJobLogService
sysJob
LogService
;
private
JobErrorLogService
jobError
LogService
;
//15分钟的常量
//15分钟的常量
...
@@ -380,27 +380,20 @@ public class RedisTask {
...
@@ -380,27 +380,20 @@ public class RedisTask {
redisUtil
.
set
(
ReceiptRdeisEnum
.
ROOM_EXPIRE_TIME
.
getValue
()
+
sOrder
.
getOrderNo
(),
json
.
toString
());
redisUtil
.
set
(
ReceiptRdeisEnum
.
ROOM_EXPIRE_TIME
.
getValue
()
+
sOrder
.
getOrderNo
(),
json
.
toString
());
logger
.
debug
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单已结束,更改订单状态为已使用"
);
logger
.
debug
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单已结束,更改订单状态为已使用"
);
}
}
SysJobLog
sysJobLog
=
new
SysJobLog
();
sysJobLog
.
setJobName
(
"AutoAddSCleanRecords:自动添加保洁记录"
);
sysJobLog
.
setJobGroup
(
"RedisTask"
);
sysJobLog
.
setInvokeTarget
(
"AutoAddSCleanRecords"
);
sysJobLog
.
setJobMessage
(
"自动添加保洁记录:"
+
jsonObject
.
toString
());
sysJobLog
.
setStatus
(
YesNoEnum
.
no
.
getIndex
().
toString
());
sysJobLogService
.
save
(
sysJobLog
);
}
catch
(
BaseException
e
)
{
}
catch
(
BaseException
e
)
{
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
o
));
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
o
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
JSONObject
jsonObject
=
new
JSONObject
(
value
);
logger
.
error
(
"订单号:"
+
jsonObject
.
getStr
(
"orderNo"
)
+
"异常,"
logger
.
error
(
"订单号:"
+
jsonObject
.
getStr
(
"orderNo"
)
+
"异常,"
+
"异常为:"
+
e
.
getMessage
()
+
"异常为:"
+
e
.
getMessage
()
);
);
SysJobLog
sysJobLog
=
new
SysJob
Log
();
JobErrorLog
jobErrorLog
=
new
JobError
Log
();
sysJobLog
.
setJobName
(
"AutoAddSCleanRecords:
自动添加保洁记录"
);
jobErrorLog
.
setJobName
(
"
自动添加保洁记录"
);
sysJob
Log
.
setJobGroup
(
"RedisTask"
);
jobError
Log
.
setJobGroup
(
"RedisTask"
);
sysJobLog
.
setInvokeTarget
(
"
AutoAddSCleanRecords"
);
jobErrorLog
.
setInvokeTarget
(
"RedisTask.
AutoAddSCleanRecords"
);
sysJob
Log
.
setJobMessage
(
"自动添加保洁记录:"
+
jsonObject
.
toString
());
jobError
Log
.
setJobMessage
(
"自动添加保洁记录:"
+
jsonObject
.
toString
());
sysJob
Log
.
setStatus
(
YesNoEnum
.
yes
.
getIndex
().
toString
());
jobError
Log
.
setStatus
(
YesNoEnum
.
yes
.
getIndex
().
toString
());
sysJob
Log
.
setExceptionInfo
(
e
.
getMessage
());
jobError
Log
.
setExceptionInfo
(
e
.
getMessage
());
sysJobLogService
.
save
(
sysJob
Log
);
jobErrorLogService
.
save
(
jobError
Log
);
continue
;
continue
;
}
}
}
}
...
@@ -550,7 +543,8 @@ public class RedisTask {
...
@@ -550,7 +543,8 @@ public class RedisTask {
if
(
keys
.
size
()
==
0
)
{
if
(
keys
.
size
()
==
0
)
{
return
;
return
;
}
}
keys
.
stream
().
forEach
(
key
->
{
for
(
String
key
:
keys
)
{
try
{
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
JSONObject
jsonObject
=
new
JSONObject
(
value
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
...
@@ -562,9 +556,23 @@ public class RedisTask {
...
@@ -562,9 +556,23 @@ public class RedisTask {
SConsumer
sConsumer
=
sConsumerService
.
getById
(
consumerId
);
SConsumer
sConsumer
=
sConsumerService
.
getById
(
consumerId
);
logger
.
debug
(
"手机号为:{}的用户年度权益会员将在3天后失效"
,
sConsumer
.
getPhone
());
logger
.
debug
(
"手机号为:{}的用户年度权益会员将在3天后失效"
,
sConsumer
.
getPhone
());
smsService
.
sendOneSms
(
sConsumer
.
getPhone
(),
"年度权益会员将在3天后失效,请及时续约保障权益会员的权益"
);
smsService
.
sendOneSms
(
sConsumer
.
getPhone
(),
"年度权益会员将在3天后失效,请及时续约保障权益会员的权益"
);
// redisUtil.delete(key);
// redisUtil.delete(key);
}
}
});
}
catch
(
Exception
e
)
{
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
JobErrorLog
jobErrorLog
=
new
JobErrorLog
();
jobErrorLog
.
setJobName
(
"自动发送权益会员过期短信"
);
jobErrorLog
.
setJobGroup
(
"RedisTask"
);
jobErrorLog
.
setInvokeTarget
(
"RedisTask.AutoEquityMembersSms"
);
jobErrorLog
.
setJobMessage
(
"自动发送权益会员过期短信:"
+
jsonObject
.
toString
());
jobErrorLog
.
setStatus
(
YesNoEnum
.
yes
.
getIndex
().
toString
());
jobErrorLog
.
setExceptionInfo
(
e
.
getMessage
());
jobErrorLogService
.
save
(
jobErrorLog
);
continue
;
}
}
logger
.
debug
(
"AutoEquityMembersSms:自动发送权益会员过期短信结束"
);
logger
.
debug
(
"AutoEquityMembersSms:自动发送权益会员过期短信结束"
);
}
}
...
@@ -576,7 +584,8 @@ public class RedisTask {
...
@@ -576,7 +584,8 @@ public class RedisTask {
if
(
keys
.
size
()
==
0
)
{
if
(
keys
.
size
()
==
0
)
{
return
;
return
;
}
}
keys
.
stream
().
forEach
(
key
->
{
for
(
String
key
:
keys
)
{
try
{
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
JSONObject
jsonObject
=
new
JSONObject
(
value
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
...
@@ -591,7 +600,20 @@ public class RedisTask {
...
@@ -591,7 +600,20 @@ public class RedisTask {
}
}
redisUtil
.
delete
(
key
);
redisUtil
.
delete
(
key
);
}
}
});
}
catch
(
Exception
e
)
{
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
JobErrorLog
jobErrorLog
=
new
JobErrorLog
();
jobErrorLog
.
setJobName
(
"权益会员降级"
);
jobErrorLog
.
setJobGroup
(
"RedisTask"
);
jobErrorLog
.
setInvokeTarget
(
"RedisTask.AutoUpdateEquityMembers"
);
jobErrorLog
.
setJobMessage
(
"权益会员降级:"
+
jsonObject
.
toString
());
jobErrorLog
.
setStatus
(
YesNoEnum
.
yes
.
getIndex
().
toString
());
jobErrorLog
.
setExceptionInfo
(
e
.
getMessage
());
jobErrorLogService
.
save
(
jobErrorLog
);
continue
;
}
}
logger
.
debug
(
"AutoUpdateEquityMembers:权益会员降级结束"
);
logger
.
debug
(
"AutoUpdateEquityMembers:权益会员降级结束"
);
}
}
...
@@ -823,7 +845,8 @@ public class RedisTask {
...
@@ -823,7 +845,8 @@ public class RedisTask {
logger
.
debug
(
"AutomaticallyMonthlyCard:自动结束月卡开始"
);
logger
.
debug
(
"AutomaticallyMonthlyCard:自动结束月卡开始"
);
Set
<
String
>
keys
=
redisTemplate
.
keys
(
ReceiptRdeisEnum
.
MONTHLY_CARD
.
getValue
()
+
"*"
);
Set
<
String
>
keys
=
redisTemplate
.
keys
(
ReceiptRdeisEnum
.
MONTHLY_CARD
.
getValue
()
+
"*"
);
if
(
keys
.
size
()
==
0
)
return
;
if
(
keys
.
size
()
==
0
)
return
;
keys
.
stream
().
forEach
(
key
->
{
for
(
String
key
:
keys
)
{
try
{
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
JSONObject
jsonObject
=
new
JSONObject
(
value
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
...
@@ -832,7 +855,20 @@ public class RedisTask {
...
@@ -832,7 +855,20 @@ public class RedisTask {
consumerMonthlyCardService
.
removeById
(
consumerMonthlyCardId
);
consumerMonthlyCardService
.
removeById
(
consumerMonthlyCardId
);
redisUtil
.
delete
(
key
);
redisUtil
.
delete
(
key
);
}
}
});
}
catch
(
Exception
e
)
{
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
JobErrorLog
jobErrorLog
=
new
JobErrorLog
();
jobErrorLog
.
setJobName
(
"自动结束月卡"
);
jobErrorLog
.
setJobGroup
(
"RedisTask"
);
jobErrorLog
.
setInvokeTarget
(
"RedisTask.AutomaticallyMonthlyCard"
);
jobErrorLog
.
setJobMessage
(
"自动结束月卡:"
+
jsonObject
.
toString
());
jobErrorLog
.
setStatus
(
YesNoEnum
.
yes
.
getIndex
().
toString
());
jobErrorLog
.
setExceptionInfo
(
e
.
getMessage
());
jobErrorLogService
.
save
(
jobErrorLog
);
continue
;
}
}
logger
.
debug
(
"AutomaticallyMonthlyCard:自动结束月卡结束"
);
logger
.
debug
(
"AutomaticallyMonthlyCard:自动结束月卡结束"
);
}
}
...
@@ -845,7 +881,8 @@ public class RedisTask {
...
@@ -845,7 +881,8 @@ public class RedisTask {
if
(
keys
.
size
()
==
0
)
return
;
if
(
keys
.
size
()
==
0
)
return
;
List
<
ConsumerMonthlyCard
>
consumerMonthlyCards
=
new
ArrayList
<>();
List
<
ConsumerMonthlyCard
>
consumerMonthlyCards
=
new
ArrayList
<>();
String
monthlyCardTime
=
sysConfigService
.
selectConfigByKey
(
"monthlyCardTime"
);
String
monthlyCardTime
=
sysConfigService
.
selectConfigByKey
(
"monthlyCardTime"
);
keys
.
stream
().
forEach
(
key
->
{
for
(
String
key
:
keys
)
{
try
{
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
JSONObject
jsonObject
=
new
JSONObject
(
value
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
...
@@ -856,7 +893,20 @@ public class RedisTask {
...
@@ -856,7 +893,20 @@ public class RedisTask {
consumerMonthlyCard
.
setId
(
consumerMonthlyCardId
);
consumerMonthlyCard
.
setId
(
consumerMonthlyCardId
);
consumerMonthlyCards
.
add
(
consumerMonthlyCard
);
consumerMonthlyCards
.
add
(
consumerMonthlyCard
);
}
}
});
}
catch
(
Exception
e
)
{
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
JobErrorLog
jobErrorLog
=
new
JobErrorLog
();
jobErrorLog
.
setJobName
(
"自动增加月卡时长"
);
jobErrorLog
.
setJobGroup
(
"RedisTask"
);
jobErrorLog
.
setInvokeTarget
(
"RedisTask.AutoMonthlyCardTime"
);
jobErrorLog
.
setJobMessage
(
"自动增加月卡时长:"
+
jsonObject
.
toString
());
jobErrorLog
.
setStatus
(
YesNoEnum
.
yes
.
getIndex
().
toString
());
jobErrorLog
.
setExceptionInfo
(
e
.
getMessage
());
jobErrorLogService
.
save
(
jobErrorLog
);
continue
;
}
}
if
(!
CollectionUtils
.
isEmpty
(
consumerMonthlyCards
))
if
(!
CollectionUtils
.
isEmpty
(
consumerMonthlyCards
))
consumerMonthlyCardService
.
updateBatchById
(
consumerMonthlyCards
);
consumerMonthlyCardService
.
updateBatchById
(
consumerMonthlyCards
);
logger
.
debug
(
"AutoMonthlyCardTime:自动增加月卡时长结束"
);
logger
.
debug
(
"AutoMonthlyCardTime:自动增加月卡时长结束"
);
...
@@ -867,7 +917,8 @@ public class RedisTask {
...
@@ -867,7 +917,8 @@ public class RedisTask {
logger
.
debug
(
"AutomaticallySecondaryCard:自动结束次卡开始"
);
logger
.
debug
(
"AutomaticallySecondaryCard:自动结束次卡开始"
);
Set
<
String
>
keys
=
redisTemplate
.
keys
(
ReceiptRdeisEnum
.
SECONDARY_CARD
.
getValue
()
+
"*"
);
Set
<
String
>
keys
=
redisTemplate
.
keys
(
ReceiptRdeisEnum
.
SECONDARY_CARD
.
getValue
()
+
"*"
);
if
(
keys
.
size
()
==
0
)
return
;
if
(
keys
.
size
()
==
0
)
return
;
keys
.
stream
().
forEach
(
key
->
{
for
(
String
key
:
keys
)
{
try
{
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
JSONObject
jsonObject
=
new
JSONObject
(
value
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
Date
expirationTime
=
jsonObject
.
getDate
(
"expirationTime"
);
...
@@ -876,8 +927,20 @@ public class RedisTask {
...
@@ -876,8 +927,20 @@ public class RedisTask {
consumerSecondaryCardService
.
removeById
(
consumerSecondaryCardId
);
consumerSecondaryCardService
.
removeById
(
consumerSecondaryCardId
);
redisUtil
.
delete
(
key
);
redisUtil
.
delete
(
key
);
}
}
});
}
catch
(
Exception
e
)
{
String
value
=
redisUtil
.
get
(
String
.
valueOf
(
key
));
JSONObject
jsonObject
=
new
JSONObject
(
value
);
JobErrorLog
jobErrorLog
=
new
JobErrorLog
();
jobErrorLog
.
setJobName
(
"自动结束次卡"
);
jobErrorLog
.
setJobGroup
(
"RedisTask"
);
jobErrorLog
.
setInvokeTarget
(
"RedisTask.AutomaticallySecondaryCard"
);
jobErrorLog
.
setJobMessage
(
"自动结束次卡:"
+
jsonObject
.
toString
());
jobErrorLog
.
setStatus
(
YesNoEnum
.
yes
.
getIndex
().
toString
());
jobErrorLog
.
setExceptionInfo
(
e
.
getMessage
());
jobErrorLogService
.
save
(
jobErrorLog
);
continue
;
}
}
logger
.
debug
(
"AutomaticallySecondaryCard:自动结束次卡结束"
);
logger
.
debug
(
"AutomaticallySecondaryCard:自动结束次卡结束"
);
}
}
...
...
share-system/src/main/java/share/system/domain/
SysJob
Log.java
→
share-system/src/main/java/share/system/domain/
JobError
Log.java
View file @
135c8c96
...
@@ -10,14 +10,14 @@ import share.common.annotation.Excel;
...
@@ -10,14 +10,14 @@ import share.common.annotation.Excel;
import
share.common.core.domain.BaseEntity
;
import
share.common.core.domain.BaseEntity
;
/**
/**
* 定时任务
日志对象 sys_job
_log
* 定时任务
异常日志对象 s_job_error
_log
*
*
* @author wuwenlong
* @author wuwenlong
* @date 2024-11-1
5
* @date 2024-11-1
8
*/
*/
@Data
@Data
@TableName
(
"sys_job
_log"
)
@TableName
(
value
=
"s_job_error
_log"
)
public
class
SysJob
Log
extends
BaseEntity
{
public
class
JobError
Log
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
...
@@ -73,7 +73,11 @@ public class SysJobLog extends BaseEntity {
...
@@ -73,7 +73,11 @@ public class SysJobLog extends BaseEntity {
.
append
(
"jobMessage"
,
getJobMessage
())
.
append
(
"jobMessage"
,
getJobMessage
())
.
append
(
"status"
,
getStatus
())
.
append
(
"status"
,
getStatus
())
.
append
(
"exceptionInfo"
,
getExceptionInfo
())
.
append
(
"exceptionInfo"
,
getExceptionInfo
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"remark"
,
getRemark
())
.
toString
();
.
toString
();
}
}
}
}
share-system/src/main/java/share/system/mapper/
SysJob
LogMapper.java
→
share-system/src/main/java/share/system/mapper/
JobError
LogMapper.java
View file @
135c8c96
package
share
.
system
.
mapper
;
package
share
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.
SysJob
Log
;
import
share.system.domain.
JobError
Log
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 定时任务日志Mapper接口
* 定时任务
异常
日志Mapper接口
*
*
* @author wuwenlong
* @author wuwenlong
* @date 2024-11-1
5
* @date 2024-11-1
8
*/
*/
public
interface
SysJobLogMapper
extends
BaseMapper
<
SysJob
Log
>
{
public
interface
JobErrorLogMapper
extends
BaseMapper
<
JobError
Log
>
{
/**
/**
* 查询定时任务日志
* 查询定时任务
异常
日志
*
*
* @param jobLogId 定时任务日志主键
* @param jobLogId 定时任务
异常
日志主键
* @return 定时任务日志
* @return 定时任务
异常
日志
*/
*/
public
SysJobLog
selectSysJob
LogByJobLogId
(
Long
jobLogId
);
public
JobErrorLog
selectJobError
LogByJobLogId
(
Long
jobLogId
);
/**
/**
* 查询定时任务日志列表
* 查询定时任务
异常
日志列表
*
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 定时任务日志集合
* @return 定时任务
异常
日志集合
*/
*/
public
List
<
SysJobLog
>
selectSysJobLogList
(
SysJobLog
sysJob
Log
);
public
List
<
JobErrorLog
>
selectJobErrorLogList
(
JobErrorLog
jobError
Log
);
/**
/**
* 新增定时任务日志
* 新增定时任务
异常
日志
*
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 结果
* @return 结果
*/
*/
public
int
insert
SysJobLog
(
SysJobLog
sysJob
Log
);
public
int
insert
JobErrorLog
(
JobErrorLog
jobError
Log
);
/**
/**
* 修改定时任务日志
* 修改定时任务
异常
日志
*
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 结果
* @return 结果
*/
*/
public
int
update
SysJobLog
(
SysJobLog
sysJob
Log
);
public
int
update
JobErrorLog
(
JobErrorLog
jobError
Log
);
/**
/**
* 删除定时任务日志
* 删除定时任务
异常
日志
*
*
* @param jobLogId 定时任务日志主键
* @param jobLogId 定时任务
异常
日志主键
* @return 结果
* @return 结果
*/
*/
public
int
delete
SysJob
LogByJobLogId
(
Long
jobLogId
);
public
int
delete
JobError
LogByJobLogId
(
Long
jobLogId
);
/**
/**
* 批量删除定时任务日志
* 批量删除定时任务
异常
日志
*
*
* @param jobLogIds 需要删除的数据主键集合
* @param jobLogIds 需要删除的数据主键集合
* @return 结果
* @return 结果
*/
*/
public
int
delete
SysJob
LogByJobLogIds
(
Long
[]
jobLogIds
);
public
int
delete
JobError
LogByJobLogIds
(
Long
[]
jobLogIds
);
void
cleanJobLog
();
void
cleanJobLog
();
}
}
share-system/src/main/java/share/system/service/
SysJob
LogService.java
→
share-system/src/main/java/share/system/service/
JobError
LogService.java
View file @
135c8c96
package
share
.
system
.
service
;
package
share
.
system
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.
SysJob
Log
;
import
share.system.domain.
JobError
Log
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 定时任务日志Service接口
* 定时任务
异常
日志Service接口
*
*
* @author wuwenlong
* @author wuwenlong
* @date 2024-11-1
5
* @date 2024-11-1
8
*/
*/
public
interface
SysJobLogService
extends
IService
<
SysJob
Log
>
{
public
interface
JobErrorLogService
extends
IService
<
JobError
Log
>
{
/**
/**
* 查询定时任务日志
* 查询定时任务
异常
日志
*
*
* @param jobLogId 定时任务日志主键
* @param jobLogId 定时任务
异常
日志主键
* @return 定时任务日志
* @return 定时任务
异常
日志
*/
*/
public
SysJobLog
selectSysJob
LogByJobLogId
(
Long
jobLogId
);
public
JobErrorLog
selectJobError
LogByJobLogId
(
Long
jobLogId
);
/**
/**
* 查询定时任务日志列表
* 查询定时任务
异常
日志列表
*
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 定时任务日志集合
* @return 定时任务
异常
日志集合
*/
*/
public
List
<
SysJobLog
>
selectSysJobLogList
(
SysJobLog
sysJob
Log
);
public
List
<
JobErrorLog
>
selectJobErrorLogList
(
JobErrorLog
jobError
Log
);
/**
/**
* 新增定时任务日志
* 新增定时任务
异常
日志
*
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 结果
* @return 结果
*/
*/
public
int
insert
SysJobLog
(
SysJobLog
sysJob
Log
);
public
int
insert
JobErrorLog
(
JobErrorLog
jobError
Log
);
/**
/**
* 修改定时任务日志
* 修改定时任务
异常
日志
*
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 结果
* @return 结果
*/
*/
public
int
update
SysJobLog
(
SysJobLog
sysJob
Log
);
public
int
update
JobErrorLog
(
JobErrorLog
jobError
Log
);
/**
/**
* 批量删除定时任务日志
* 批量删除定时任务
异常
日志
*
*
* @param jobLogIds 需要删除的定时任务日志主键集合
* @param jobLogIds 需要删除的定时任务
异常
日志主键集合
* @return 结果
* @return 结果
*/
*/
public
int
delete
SysJob
LogByJobLogIds
(
Long
[]
jobLogIds
);
public
int
delete
JobError
LogByJobLogIds
(
Long
[]
jobLogIds
);
/**
/**
* 删除定时任务日志信息
* 删除定时任务
异常
日志信息
*
*
* @param jobLogId 定时任务日志主键
* @param jobLogId 定时任务
异常
日志主键
* @return 结果
* @return 结果
*/
*/
public
int
delete
SysJob
LogByJobLogId
(
Long
jobLogId
);
public
int
delete
JobError
LogByJobLogId
(
Long
jobLogId
);
public
void
cleanJobLog
();
void
cleanJobLog
();
}
}
share-system/src/main/java/share/system/service/impl/
SysJob
LogServiceImpl.java
→
share-system/src/main/java/share/system/service/impl/
JobError
LogServiceImpl.java
View file @
135c8c96
...
@@ -4,92 +4,93 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...
@@ -4,92 +4,93 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
share.common.utils.DateUtils
;
import
share.common.utils.DateUtils
;
import
share.system.domain.
SysJob
Log
;
import
share.system.domain.
JobError
Log
;
import
share.system.mapper.
SysJob
LogMapper
;
import
share.system.mapper.
JobError
LogMapper
;
import
share.system.service.
SysJob
LogService
;
import
share.system.service.
JobError
LogService
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 定时任务日志Service业务层处理
* 定时任务
异常
日志Service业务层处理
*
*
* @author wuwenlong
* @author wuwenlong
* @date 2024-11-1
5
* @date 2024-11-1
8
*/
*/
@Service
@Service
public
class
SysJobLogServiceImpl
extends
ServiceImpl
<
SysJobLogMapper
,
SysJobLog
>
implements
SysJob
LogService
{
public
class
JobErrorLogServiceImpl
extends
ServiceImpl
<
JobErrorLogMapper
,
JobErrorLog
>
implements
JobError
LogService
{
@Autowired
@Autowired
private
SysJobLogMapper
sysJob
LogMapper
;
private
JobErrorLogMapper
jobError
LogMapper
;
/**
/**
* 查询定时任务日志
* 查询定时任务
异常
日志
*
*
* @param jobLogId 定时任务日志主键
* @param jobLogId 定时任务
异常
日志主键
* @return 定时任务日志
* @return 定时任务
异常
日志
*/
*/
@Override
@Override
public
SysJobLog
selectSysJob
LogByJobLogId
(
Long
jobLogId
)
{
public
JobErrorLog
selectJobError
LogByJobLogId
(
Long
jobLogId
)
{
return
sysJobLogMapper
.
selectSysJob
LogByJobLogId
(
jobLogId
);
return
jobErrorLogMapper
.
selectJobError
LogByJobLogId
(
jobLogId
);
}
}
/**
/**
* 查询定时任务日志列表
* 查询定时任务
异常
日志列表
*
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 定时任务日志
* @return 定时任务
异常
日志
*/
*/
@Override
@Override
public
List
<
SysJobLog
>
selectSysJobLogList
(
SysJobLog
sysJob
Log
)
{
public
List
<
JobErrorLog
>
selectJobErrorLogList
(
JobErrorLog
jobError
Log
)
{
return
sysJobLogMapper
.
selectSysJobLogList
(
sysJob
Log
);
return
jobErrorLogMapper
.
selectJobErrorLogList
(
jobError
Log
);
}
}
/**
/**
* 新增定时任务日志
* 新增定时任务
异常
日志
*
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 结果
* @return 结果
*/
*/
@Override
@Override
public
int
insert
SysJobLog
(
SysJobLog
sysJob
Log
)
{
public
int
insert
JobErrorLog
(
JobErrorLog
jobError
Log
)
{
sysJob
Log
.
setCreateTime
(
DateUtils
.
getNowDate
());
jobError
Log
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
sysJobLogMapper
.
insertSysJobLog
(
sysJob
Log
);
return
jobErrorLogMapper
.
insertJobErrorLog
(
jobError
Log
);
}
}
/**
/**
* 修改定时任务日志
* 修改定时任务
异常
日志
*
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 结果
* @return 结果
*/
*/
@Override
@Override
public
int
updateSysJobLog
(
SysJobLog
sysJobLog
)
{
public
int
updateJobErrorLog
(
JobErrorLog
jobErrorLog
)
{
return
sysJobLogMapper
.
updateSysJobLog
(
sysJobLog
);
jobErrorLog
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
jobErrorLogMapper
.
updateJobErrorLog
(
jobErrorLog
);
}
}
/**
/**
* 批量删除定时任务日志
* 批量删除定时任务
异常
日志
*
*
* @param jobLogIds 需要删除的定时任务日志主键
* @param jobLogIds 需要删除的定时任务
异常
日志主键
* @return 结果
* @return 结果
*/
*/
@Override
@Override
public
int
delete
SysJob
LogByJobLogIds
(
Long
[]
jobLogIds
)
{
public
int
delete
JobError
LogByJobLogIds
(
Long
[]
jobLogIds
)
{
return
sysJobLogMapper
.
deleteSysJob
LogByJobLogIds
(
jobLogIds
);
return
jobErrorLogMapper
.
deleteJobError
LogByJobLogIds
(
jobLogIds
);
}
}
/**
/**
* 删除定时任务日志信息
* 删除定时任务
异常
日志信息
*
*
* @param jobLogId 定时任务日志主键
* @param jobLogId 定时任务
异常
日志主键
* @return 结果
* @return 结果
*/
*/
@Override
@Override
public
int
delete
SysJob
LogByJobLogId
(
Long
jobLogId
)
{
public
int
delete
JobError
LogByJobLogId
(
Long
jobLogId
)
{
return
sysJobLogMapper
.
deleteSysJob
LogByJobLogId
(
jobLogId
);
return
jobErrorLogMapper
.
deleteJobError
LogByJobLogId
(
jobLogId
);
}
}
@Override
@Override
public
void
cleanJobLog
()
{
public
void
cleanJobLog
()
{
sysJob
LogMapper
.
cleanJobLog
();
jobError
LogMapper
.
cleanJobLog
();
}
}
}
}
share-system/src/main/resources/mapper/system/
SysJob
LogMapper.xml
→
share-system/src/main/resources/mapper/system/
JobError
LogMapper.xml
View file @
135c8c96
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
<!DOCTYPE mapper
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"share.system.mapper.
SysJob
LogMapper"
>
<mapper
namespace=
"share.system.mapper.
JobError
LogMapper"
>
<resultMap
type=
"
SysJobLog"
id=
"SysJob
LogResult"
>
<resultMap
type=
"
JobErrorLog"
id=
"JobError
LogResult"
>
<result
property=
"jobLogId"
column=
"job_log_id"
/>
<result
property=
"jobLogId"
column=
"job_log_id"
/>
<result
property=
"jobName"
column=
"job_name"
/>
<result
property=
"jobName"
column=
"job_name"
/>
<result
property=
"jobGroup"
column=
"job_group"
/>
<result
property=
"jobGroup"
column=
"job_group"
/>
...
@@ -12,10 +12,14 @@
...
@@ -12,10 +12,14 @@
<result
property=
"jobMessage"
column=
"job_message"
/>
<result
property=
"jobMessage"
column=
"job_message"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"exceptionInfo"
column=
"exception_info"
/>
<result
property=
"exceptionInfo"
column=
"exception_info"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
</resultMap>
<sql
id=
"select
SysJob
LogVo"
>
<sql
id=
"select
JobError
LogVo"
>
select job_log_id,
select job_log_id,
job_name,
job_name,
job_group,
job_group,
...
@@ -23,12 +27,16 @@
...
@@ -23,12 +27,16 @@
job_message,
job_message,
status,
status,
exception_info,
exception_info,
create_time
create_by,
from sys_job_log
create_time,
update_by,
update_time,
remark
from s_job_error_log
</sql>
</sql>
<select
id=
"select
SysJobLogList"
parameterType=
"SysJobLog"
resultMap=
"SysJob
LogResult"
>
<select
id=
"select
JobErrorLogList"
parameterType=
"JobErrorLog"
resultMap=
"JobError
LogResult"
>
<include
refid=
"select
SysJob
LogVo"
/>
<include
refid=
"select
JobError
LogVo"
/>
<where>
<where>
<if
test=
"jobName != null and jobName != ''"
>
and job_name like concat('%', #{jobName}, '%')
</if>
<if
test=
"jobName != null and jobName != ''"
>
and job_name like concat('%', #{jobName}, '%')
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
and job_group = #{jobGroup}
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
and job_group = #{jobGroup}
</if>
...
@@ -39,13 +47,13 @@
...
@@ -39,13 +47,13 @@
</where>
</where>
</select>
</select>
<select
id=
"select
SysJobLogByJobLogId"
parameterType=
"Long"
resultMap=
"SysJob
LogResult"
>
<select
id=
"select
JobErrorLogByJobLogId"
parameterType=
"Long"
resultMap=
"JobError
LogResult"
>
<include
refid=
"select
SysJob
LogVo"
/>
<include
refid=
"select
JobError
LogVo"
/>
where job_log_id = #{jobLogId}
where job_log_id = #{jobLogId}
</select>
</select>
<insert
id=
"insert
SysJobLog"
parameterType=
"SysJob
Log"
useGeneratedKeys=
"true"
keyProperty=
"jobLogId"
>
<insert
id=
"insert
JobErrorLog"
parameterType=
"JobError
Log"
useGeneratedKeys=
"true"
keyProperty=
"jobLogId"
>
insert into s
ys_job
_log
insert into s
_job_error
_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"jobName != null and jobName != ''"
>
job_name,
</if>
<if
test=
"jobName != null and jobName != ''"
>
job_name,
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
job_group,
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
job_group,
</if>
...
@@ -53,7 +61,11 @@
...
@@ -53,7 +61,11 @@
<if
test=
"jobMessage != null"
>
job_message,
</if>
<if
test=
"jobMessage != null"
>
job_message,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"exceptionInfo != null"
>
exception_info,
</if>
<if
test=
"exceptionInfo != null"
>
exception_info,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"jobName != null and jobName != ''"
>
#{jobName},
</if>
<if
test=
"jobName != null and jobName != ''"
>
#{jobName},
</if>
...
@@ -62,12 +74,16 @@
...
@@ -62,12 +74,16 @@
<if
test=
"jobMessage != null"
>
#{jobMessage},
</if>
<if
test=
"jobMessage != null"
>
#{jobMessage},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"exceptionInfo != null"
>
#{exceptionInfo},
</if>
<if
test=
"exceptionInfo != null"
>
#{exceptionInfo},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
</trim>
</trim>
</insert>
</insert>
<update
id=
"update
SysJobLog"
parameterType=
"SysJob
Log"
>
<update
id=
"update
JobErrorLog"
parameterType=
"JobError
Log"
>
update s
ys_job
_log
update s
_job_error
_log
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"jobName != null and jobName != ''"
>
job_name = #{jobName},
</if>
<if
test=
"jobName != null and jobName != ''"
>
job_name = #{jobName},
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
job_group = #{jobGroup},
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
job_group = #{jobGroup},
</if>
...
@@ -75,25 +91,29 @@
...
@@ -75,25 +91,29 @@
<if
test=
"jobMessage != null"
>
job_message = #{jobMessage},
</if>
<if
test=
"jobMessage != null"
>
job_message = #{jobMessage},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"exceptionInfo != null"
>
exception_info = #{exceptionInfo},
</if>
<if
test=
"exceptionInfo != null"
>
exception_info = #{exceptionInfo},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
</trim>
</trim>
where job_log_id = #{jobLogId}
where job_log_id = #{jobLogId}
</update>
</update>
<delete
id=
"delete
SysJob
LogByJobLogId"
parameterType=
"Long"
>
<delete
id=
"delete
JobError
LogByJobLogId"
parameterType=
"Long"
>
delete
delete
from s
ys_job
_log
from s
_job_error
_log
where job_log_id = #{jobLogId}
where job_log_id = #{jobLogId}
</delete>
</delete>
<delete
id=
"delete
SysJob
LogByJobLogIds"
parameterType=
"String"
>
<delete
id=
"delete
JobError
LogByJobLogIds"
parameterType=
"String"
>
delete from s
ys_job
_log where job_log_id in
delete from s
_job_error
_log where job_log_id in
<foreach
item=
"jobLogId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
<foreach
item=
"jobLogId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{jobLogId}
#{jobLogId}
</foreach>
</foreach>
</delete>
</delete>
<update
id=
"cleanJobLog"
>
<update
id=
"cleanJobLog"
>
truncate table s
ys_job
_log
truncate table s
_job_error
_log
</update>
</update>
</mapper>
</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