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
Expand all
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;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.
SysJob
Log
;
import
share.system.service.
SysJob
LogService
;
import
share.system.domain.
JobError
Log
;
import
share.system.service.
JobError
LogService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 定时任务日志Controller
* 定时任务
异常
日志Controller
*
* @author wuwenlong
* @date 2024-11-1
5
* @date 2024-11-1
8
*/
@RestController
@RequestMapping
(
"/system/
sysJob
Log"
)
public
class
SysJob
LogController
extends
BaseController
{
@RequestMapping
(
"/system/
jobError
Log"
)
public
class
JobError
LogController
extends
BaseController
{
@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"
)
public
TableDataInfo
list
(
SysJobLog
sysJob
Log
)
{
public
TableDataInfo
list
(
JobErrorLog
jobError
Log
)
{
startPage
();
List
<
SysJobLog
>
list
=
sysJobLogService
.
selectSysJobLogList
(
sysJob
Log
);
List
<
JobErrorLog
>
list
=
jobErrorLogService
.
selectJobErrorLogList
(
jobError
Log
);
return
getDataTable
(
list
);
}
/**
* 导出定时任务日志列表
* 导出定时任务
异常
日志列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:
sysJob
Log:export')"
)
@Log
(
title
=
"定时任务日志"
,
businessType
=
BusinessType
.
EXPORT
)
@PreAuthorize
(
"@ss.hasPermi('system:
jobError
Log:export')"
)
@Log
(
title
=
"定时任务
异常
日志"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SysJobLog
sysJob
Log
)
{
List
<
SysJobLog
>
list
=
sysJobLogService
.
selectSysJobLogList
(
sysJob
Log
);
ExcelUtil
<
SysJobLog
>
util
=
new
ExcelUtil
<
SysJobLog
>(
SysJob
Log
.
class
);
util
.
exportExcel
(
response
,
list
,
"定时任务日志数据"
);
public
void
export
(
HttpServletResponse
response
,
JobErrorLog
jobError
Log
)
{
List
<
JobErrorLog
>
list
=
jobErrorLogService
.
selectJobErrorLogList
(
jobError
Log
);
ExcelUtil
<
JobErrorLog
>
util
=
new
ExcelUtil
<
JobErrorLog
>(
JobError
Log
.
class
);
util
.
exportExcel
(
response
,
list
,
"定时任务
异常
日志数据"
);
}
/**
* 获取定时任务日志详细信息
* 获取定时任务
异常
日志详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:
sysJob
Log:query')"
)
@PreAuthorize
(
"@ss.hasPermi('system:
jobError
Log:query')"
)
@GetMapping
(
value
=
"/{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')"
)
@Log
(
title
=
"定时任务日志"
,
businessType
=
BusinessType
.
INSERT
)
@PreAuthorize
(
"@ss.hasPermi('system:
jobError
Log:add')"
)
@Log
(
title
=
"定时任务
异常
日志"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SysJobLog
sysJob
Log
)
{
return
toAjax
(
sysJobLogService
.
insertSysJobLog
(
sysJob
Log
));
public
AjaxResult
add
(
@RequestBody
JobErrorLog
jobError
Log
)
{
return
toAjax
(
jobErrorLogService
.
insertJobErrorLog
(
jobError
Log
));
}
/**
* 修改定时任务日志
* 修改定时任务
异常
日志
*/
@PreAuthorize
(
"@ss.hasPermi('system:
sysJob
Log:edit')"
)
@Log
(
title
=
"定时任务日志"
,
businessType
=
BusinessType
.
UPDATE
)
@PreAuthorize
(
"@ss.hasPermi('system:
jobError
Log:edit')"
)
@Log
(
title
=
"定时任务
异常
日志"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SysJobLog
sysJob
Log
)
{
return
toAjax
(
sysJobLogService
.
updateSysJobLog
(
sysJob
Log
));
public
AjaxResult
edit
(
@RequestBody
JobErrorLog
jobError
Log
)
{
return
toAjax
(
jobErrorLogService
.
updateJobErrorLog
(
jobError
Log
));
}
/**
* 删除定时任务日志
* 删除定时任务
异常
日志
*/
@PreAuthorize
(
"@ss.hasPermi('system:
sysJob
Log:remove')"
)
@Log
(
title
=
"定时任务日志"
,
businessType
=
BusinessType
.
DELETE
)
@PreAuthorize
(
"@ss.hasPermi('system:
jobError
Log:remove')"
)
@Log
(
title
=
"定时任务
异常
日志"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{jobLogIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
jobLogIds
)
{
return
toAjax
(
sysJobLogService
.
deleteSysJob
LogByJobLogIds
(
jobLogIds
));
return
toAjax
(
jobErrorLogService
.
deleteJobError
LogByJobLogIds
(
jobLogIds
));
}
@DeleteMapping
(
"/clean"
)
public
AjaxResult
clean
()
{
sysJob
LogService
.
cleanJobLog
();
jobError
LogService
.
cleanJobLog
();
return
success
();
}
}
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
135c8c96
This diff is collapsed.
Click to expand it.
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;
import
share.common.core.domain.BaseEntity
;
/**
* 定时任务
日志对象 sys_job
_log
* 定时任务
异常日志对象 s_job_error
_log
*
* @author wuwenlong
* @date 2024-11-1
5
* @date 2024-11-1
8
*/
@Data
@TableName
(
"sys_job
_log"
)
public
class
SysJob
Log
extends
BaseEntity
{
@TableName
(
value
=
"s_job_error
_log"
)
public
class
JobError
Log
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
...
...
@@ -73,7 +73,11 @@ public class SysJobLog extends BaseEntity {
.
append
(
"jobMessage"
,
getJobMessage
())
.
append
(
"status"
,
getStatus
())
.
append
(
"exceptionInfo"
,
getExceptionInfo
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"remark"
,
getRemark
())
.
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
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.
SysJob
Log
;
import
share.system.domain.
JobError
Log
;
import
java.util.List
;
/**
* 定时任务日志Mapper接口
* 定时任务
异常
日志Mapper接口
*
* @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 定时任务日志主键
* @return 定时任务日志
* @param jobLogId 定时任务
异常
日志主键
* @return 定时任务
异常
日志
*/
public
SysJobLog
selectSysJob
LogByJobLogId
(
Long
jobLogId
);
public
JobErrorLog
selectJobError
LogByJobLogId
(
Long
jobLogId
);
/**
* 查询定时任务日志列表
* 查询定时任务
异常
日志列表
*
* @param
sysJobLog 定时任务
日志
* @return 定时任务日志集合
* @param
jobErrorLog 定时任务异常
日志
* @return 定时任务
异常
日志集合
*/
public
List
<
SysJobLog
>
selectSysJobLogList
(
SysJobLog
sysJob
Log
);
public
List
<
JobErrorLog
>
selectJobErrorLogList
(
JobErrorLog
jobError
Log
);
/**
* 新增定时任务日志
* 新增定时任务
异常
日志
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 结果
*/
public
int
insert
SysJobLog
(
SysJobLog
sysJob
Log
);
public
int
insert
JobErrorLog
(
JobErrorLog
jobError
Log
);
/**
* 修改定时任务日志
* 修改定时任务
异常
日志
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 结果
*/
public
int
update
SysJobLog
(
SysJobLog
sysJob
Log
);
public
int
update
JobErrorLog
(
JobErrorLog
jobError
Log
);
/**
* 删除定时任务日志
* 删除定时任务
异常
日志
*
* @param jobLogId 定时任务日志主键
* @param jobLogId 定时任务
异常
日志主键
* @return 结果
*/
public
int
delete
SysJob
LogByJobLogId
(
Long
jobLogId
);
public
int
delete
JobError
LogByJobLogId
(
Long
jobLogId
);
/**
* 批量删除定时任务日志
* 批量删除定时任务
异常
日志
*
* @param jobLogIds 需要删除的数据主键集合
* @return 结果
*/
public
int
delete
SysJob
LogByJobLogIds
(
Long
[]
jobLogIds
);
public
int
delete
JobError
LogByJobLogIds
(
Long
[]
jobLogIds
);
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
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.
SysJob
Log
;
import
share.system.domain.
JobError
Log
;
import
java.util.List
;
/**
* 定时任务日志Service接口
* 定时任务
异常
日志Service接口
*
* @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 定时任务日志主键
* @return 定时任务日志
* @param jobLogId 定时任务
异常
日志主键
* @return 定时任务
异常
日志
*/
public
SysJobLog
selectSysJob
LogByJobLogId
(
Long
jobLogId
);
public
JobErrorLog
selectJobError
LogByJobLogId
(
Long
jobLogId
);
/**
* 查询定时任务日志列表
* 查询定时任务
异常
日志列表
*
* @param
sysJobLog 定时任务
日志
* @return 定时任务日志集合
* @param
jobErrorLog 定时任务异常
日志
* @return 定时任务
异常
日志集合
*/
public
List
<
SysJobLog
>
selectSysJobLogList
(
SysJobLog
sysJob
Log
);
public
List
<
JobErrorLog
>
selectJobErrorLogList
(
JobErrorLog
jobError
Log
);
/**
* 新增定时任务日志
* 新增定时任务
异常
日志
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 结果
*/
public
int
insert
SysJobLog
(
SysJobLog
sysJob
Log
);
public
int
insert
JobErrorLog
(
JobErrorLog
jobError
Log
);
/**
* 修改定时任务日志
* 修改定时任务
异常
日志
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 结果
*/
public
int
update
SysJobLog
(
SysJobLog
sysJob
Log
);
public
int
update
JobErrorLog
(
JobErrorLog
jobError
Log
);
/**
* 批量删除定时任务日志
* 批量删除定时任务
异常
日志
*
* @param jobLogIds 需要删除的定时任务日志主键集合
* @param jobLogIds 需要删除的定时任务
异常
日志主键集合
* @return 结果
*/
public
int
delete
SysJob
LogByJobLogIds
(
Long
[]
jobLogIds
);
public
int
delete
JobError
LogByJobLogIds
(
Long
[]
jobLogIds
);
/**
* 删除定时任务日志信息
* 删除定时任务
异常
日志信息
*
* @param jobLogId 定时任务日志主键
* @param jobLogId 定时任务
异常
日志主键
* @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;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
share.common.utils.DateUtils
;
import
share.system.domain.
SysJob
Log
;
import
share.system.mapper.
SysJob
LogMapper
;
import
share.system.service.
SysJob
LogService
;
import
share.system.domain.
JobError
Log
;
import
share.system.mapper.
JobError
LogMapper
;
import
share.system.service.
JobError
LogService
;
import
java.util.List
;
/**
* 定时任务日志Service业务层处理
* 定时任务
异常
日志Service业务层处理
*
* @author wuwenlong
* @date 2024-11-1
5
* @date 2024-11-1
8
*/
@Service
public
class
SysJobLogServiceImpl
extends
ServiceImpl
<
SysJobLogMapper
,
SysJobLog
>
implements
SysJob
LogService
{
public
class
JobErrorLogServiceImpl
extends
ServiceImpl
<
JobErrorLogMapper
,
JobErrorLog
>
implements
JobError
LogService
{
@Autowired
private
SysJobLogMapper
sysJob
LogMapper
;
private
JobErrorLogMapper
jobError
LogMapper
;
/**
* 查询定时任务日志
* 查询定时任务
异常
日志
*
* @param jobLogId 定时任务日志主键
* @return 定时任务日志
* @param jobLogId 定时任务
异常
日志主键
* @return 定时任务
异常
日志
*/
@Override
public
SysJobLog
selectSysJob
LogByJobLogId
(
Long
jobLogId
)
{
return
sysJobLogMapper
.
selectSysJob
LogByJobLogId
(
jobLogId
);
public
JobErrorLog
selectJobError
LogByJobLogId
(
Long
jobLogId
)
{
return
jobErrorLogMapper
.
selectJobError
LogByJobLogId
(
jobLogId
);
}
/**
* 查询定时任务日志列表
* 查询定时任务
异常
日志列表
*
* @param
sysJobLog 定时任务
日志
* @return 定时任务日志
* @param
jobErrorLog 定时任务异常
日志
* @return 定时任务
异常
日志
*/
@Override
public
List
<
SysJobLog
>
selectSysJobLogList
(
SysJobLog
sysJob
Log
)
{
return
sysJobLogMapper
.
selectSysJobLogList
(
sysJob
Log
);
public
List
<
JobErrorLog
>
selectJobErrorLogList
(
JobErrorLog
jobError
Log
)
{
return
jobErrorLogMapper
.
selectJobErrorLogList
(
jobError
Log
);
}
/**
* 新增定时任务日志
* 新增定时任务
异常
日志
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 结果
*/
@Override
public
int
insert
SysJobLog
(
SysJobLog
sysJob
Log
)
{
sysJob
Log
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
sysJobLogMapper
.
insertSysJobLog
(
sysJob
Log
);
public
int
insert
JobErrorLog
(
JobErrorLog
jobError
Log
)
{
jobError
Log
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
jobErrorLogMapper
.
insertJobErrorLog
(
jobError
Log
);
}
/**
* 修改定时任务日志
* 修改定时任务
异常
日志
*
* @param
sysJobLog 定时任务
日志
* @param
jobErrorLog 定时任务异常
日志
* @return 结果
*/
@Override
public
int
updateSysJobLog
(
SysJobLog
sysJobLog
)
{
return
sysJobLogMapper
.
updateSysJobLog
(
sysJobLog
);
public
int
updateJobErrorLog
(
JobErrorLog
jobErrorLog
)
{
jobErrorLog
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
jobErrorLogMapper
.
updateJobErrorLog
(
jobErrorLog
);
}
/**
* 批量删除定时任务日志
* 批量删除定时任务
异常
日志
*
* @param jobLogIds 需要删除的定时任务日志主键
* @param jobLogIds 需要删除的定时任务
异常
日志主键
* @return 结果
*/
@Override
public
int
delete
SysJob
LogByJobLogIds
(
Long
[]
jobLogIds
)
{
return
sysJobLogMapper
.
deleteSysJob
LogByJobLogIds
(
jobLogIds
);
public
int
delete
JobError
LogByJobLogIds
(
Long
[]
jobLogIds
)
{
return
jobErrorLogMapper
.
deleteJobError
LogByJobLogIds
(
jobLogIds
);
}
/**
* 删除定时任务日志信息
* 删除定时任务
异常
日志信息
*
* @param jobLogId 定时任务日志主键
* @param jobLogId 定时任务
异常
日志主键
* @return 结果
*/
@Override
public
int
delete
SysJob
LogByJobLogId
(
Long
jobLogId
)
{
return
sysJobLogMapper
.
deleteSysJob
LogByJobLogId
(
jobLogId
);
public
int
delete
JobError
LogByJobLogId
(
Long
jobLogId
)
{
return
jobErrorLogMapper
.
deleteJobError
LogByJobLogId
(
jobLogId
);
}
@Override
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 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"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=
"jobName"
column=
"job_name"
/>
<result
property=
"jobGroup"
column=
"job_group"
/>
...
...
@@ -12,10 +12,14 @@
<result
property=
"jobMessage"
column=
"job_message"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"exceptionInfo"
column=
"exception_info"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
<sql
id=
"select
SysJob
LogVo"
>
<sql
id=
"select
JobError
LogVo"
>
select job_log_id,
job_name,
job_group,
...
...
@@ -23,12 +27,16 @@
job_message,
status,
exception_info,
create_time
from sys_job_log
create_by,
create_time,
update_by,
update_time,
remark
from s_job_error_log
</sql>
<select
id=
"select
SysJobLogList"
parameterType=
"SysJobLog"
resultMap=
"SysJob
LogResult"
>
<include
refid=
"select
SysJob
LogVo"
/>
<select
id=
"select
JobErrorLogList"
parameterType=
"JobErrorLog"
resultMap=
"JobError
LogResult"
>
<include
refid=
"select
JobError
LogVo"
/>
<where>
<if
test=
"jobName != null and jobName != ''"
>
and job_name like concat('%', #{jobName}, '%')
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
and job_group = #{jobGroup}
</if>
...
...
@@ -39,13 +47,13 @@
</where>
</select>
<select
id=
"select
SysJobLogByJobLogId"
parameterType=
"Long"
resultMap=
"SysJob
LogResult"
>
<include
refid=
"select
SysJob
LogVo"
/>
<select
id=
"select
JobErrorLogByJobLogId"
parameterType=
"Long"
resultMap=
"JobError
LogResult"
>
<include
refid=
"select
JobError
LogVo"
/>
where job_log_id = #{jobLogId}
</select>
<insert
id=
"insert
SysJobLog"
parameterType=
"SysJob
Log"
useGeneratedKeys=
"true"
keyProperty=
"jobLogId"
>
insert into s
ys_job
_log
<insert
id=
"insert
JobErrorLog"
parameterType=
"JobError
Log"
useGeneratedKeys=
"true"
keyProperty=
"jobLogId"
>
insert into s
_job_error
_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"jobName != null and jobName != ''"
>
job_name,
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
job_group,
</if>
...
...
@@ -53,7 +61,11 @@
<if
test=
"jobMessage != null"
>
job_message,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"exceptionInfo != null"
>
exception_info,
</if>
<if
test=
"createBy != null"
>
create_by,
</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
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"jobName != null and jobName != ''"
>
#{jobName},
</if>
...
...
@@ -62,12 +74,16 @@
<if
test=
"jobMessage != null"
>
#{jobMessage},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"exceptionInfo != null"
>
#{exceptionInfo},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</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>
</insert>
<update
id=
"update
SysJobLog"
parameterType=
"SysJob
Log"
>
update s
ys_job
_log
<update
id=
"update
JobErrorLog"
parameterType=
"JobError
Log"
>
update s
_job_error
_log
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"jobName != null and jobName != ''"
>
job_name = #{jobName},
</if>
<if
test=
"jobGroup != null and jobGroup != ''"
>
job_group = #{jobGroup},
</if>
...
...
@@ -75,25 +91,29 @@
<if
test=
"jobMessage != null"
>
job_message = #{jobMessage},
</if>
<if
test=
"status != null"
>
status = #{status},
</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=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
</trim>
where job_log_id = #{jobLogId}
</update>
<delete
id=
"delete
SysJob
LogByJobLogId"
parameterType=
"Long"
>
<delete
id=
"delete
JobError
LogByJobLogId"
parameterType=
"Long"
>
delete
from s
ys_job
_log
from s
_job_error
_log
where job_log_id = #{jobLogId}
</delete>
<delete
id=
"delete
SysJob
LogByJobLogIds"
parameterType=
"String"
>
delete from s
ys_job
_log where job_log_id in
<delete
id=
"delete
JobError
LogByJobLogIds"
parameterType=
"String"
>
delete from s
_job_error
_log where job_log_id in
<foreach
item=
"jobLogId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{jobLogId}
</foreach>
</delete>
<update
id=
"cleanJobLog"
>
truncate table s
ys_job
_log
truncate table s
_job_error
_log
</update>
</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