Commit 135c8c96 by 吕明尚

Merge branch 'dev' into test

parents 32bd89b9 4f516337
...@@ -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.SysJobLog; import share.system.domain.JobErrorLog;
import share.system.service.SysJobLogService; import share.system.service.JobErrorLogService;
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-15 * @date 2024-11-18
*/ */
@RestController @RestController
@RequestMapping("/system/sysJobLog") @RequestMapping("/system/jobErrorLog")
public class SysJobLogController extends BaseController { public class JobErrorLogController extends BaseController {
@Autowired @Autowired
private SysJobLogService sysJobLogService; private JobErrorLogService jobErrorLogService;
/** /**
* 查询定时任务日志列表 * 查询定时任务异常日志列表
*/ */
@PreAuthorize("@ss.hasPermi('system:sysJobLog:list')") @PreAuthorize("@ss.hasPermi('system:jobErrorLog:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(SysJobLog sysJobLog) { public TableDataInfo list(JobErrorLog jobErrorLog) {
startPage(); startPage();
List<SysJobLog> list = sysJobLogService.selectSysJobLogList(sysJobLog); List<JobErrorLog> list = jobErrorLogService.selectJobErrorLogList(jobErrorLog);
return getDataTable(list); return getDataTable(list);
} }
/** /**
* 导出定时任务日志列表 * 导出定时任务异常日志列表
*/ */
@PreAuthorize("@ss.hasPermi('system:sysJobLog:export')") @PreAuthorize("@ss.hasPermi('system:jobErrorLog:export')")
@Log(title = "定时任务日志", businessType = BusinessType.EXPORT) @Log(title = "定时任务异常日志", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, SysJobLog sysJobLog) { public void export(HttpServletResponse response, JobErrorLog jobErrorLog) {
List<SysJobLog> list = sysJobLogService.selectSysJobLogList(sysJobLog); List<JobErrorLog> list = jobErrorLogService.selectJobErrorLogList(jobErrorLog);
ExcelUtil<SysJobLog> util = new ExcelUtil<SysJobLog>(SysJobLog.class); ExcelUtil<JobErrorLog> util = new ExcelUtil<JobErrorLog>(JobErrorLog.class);
util.exportExcel(response, list, "定时任务日志数据"); util.exportExcel(response, list, "定时任务异常日志数据");
} }
/** /**
* 获取定时任务日志详细信息 * 获取定时任务异常日志详细信息
*/ */
@PreAuthorize("@ss.hasPermi('system:sysJobLog:query')") @PreAuthorize("@ss.hasPermi('system:jobErrorLog:query')")
@GetMapping(value = "/{jobLogId}") @GetMapping(value = "/{jobLogId}")
public AjaxResult getInfo(@PathVariable("jobLogId") Long jobLogId) { public AjaxResult getInfo(@PathVariable("jobLogId") Long jobLogId) {
return success(sysJobLogService.selectSysJobLogByJobLogId(jobLogId)); return success(jobErrorLogService.selectJobErrorLogByJobLogId(jobLogId));
} }
/** /**
* 新增定时任务日志 * 新增定时任务异常日志
*/ */
@PreAuthorize("@ss.hasPermi('system:sysJobLog:add')") @PreAuthorize("@ss.hasPermi('system:jobErrorLog:add')")
@Log(title = "定时任务日志", businessType = BusinessType.INSERT) @Log(title = "定时任务异常日志", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody SysJobLog sysJobLog) { public AjaxResult add(@RequestBody JobErrorLog jobErrorLog) {
return toAjax(sysJobLogService.insertSysJobLog(sysJobLog)); return toAjax(jobErrorLogService.insertJobErrorLog(jobErrorLog));
} }
/** /**
* 修改定时任务日志 * 修改定时任务异常日志
*/ */
@PreAuthorize("@ss.hasPermi('system:sysJobLog:edit')") @PreAuthorize("@ss.hasPermi('system:jobErrorLog:edit')")
@Log(title = "定时任务日志", businessType = BusinessType.UPDATE) @Log(title = "定时任务异常日志", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody SysJobLog sysJobLog) { public AjaxResult edit(@RequestBody JobErrorLog jobErrorLog) {
return toAjax(sysJobLogService.updateSysJobLog(sysJobLog)); return toAjax(jobErrorLogService.updateJobErrorLog(jobErrorLog));
} }
/** /**
* 删除定时任务日志 * 删除定时任务异常日志
*/ */
@PreAuthorize("@ss.hasPermi('system:sysJobLog:remove')") @PreAuthorize("@ss.hasPermi('system:jobErrorLog: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.deleteSysJobLogByJobLogIds(jobLogIds)); return toAjax(jobErrorLogService.deleteJobErrorLogByJobLogIds(jobLogIds));
} }
@DeleteMapping("/clean") @DeleteMapping("/clean")
public AjaxResult clean() { public AjaxResult clean() {
sysJobLogService.cleanJobLog(); jobErrorLogService.cleanJobLog();
return success(); return success();
} }
} }
...@@ -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-15 * @date 2024-11-18
*/ */
@Data @Data
@TableName("sys_job_log") @TableName(value = "s_job_error_log")
public class SysJobLog extends BaseEntity { public class JobErrorLog 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();
} }
} }
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.SysJobLog; import share.system.domain.JobErrorLog;
import java.util.List; import java.util.List;
/** /**
* 定时任务日志Mapper接口 * 定时任务异常日志Mapper接口
* *
* @author wuwenlong * @author wuwenlong
* @date 2024-11-15 * @date 2024-11-18
*/ */
public interface SysJobLogMapper extends BaseMapper<SysJobLog> { public interface JobErrorLogMapper extends BaseMapper<JobErrorLog> {
/** /**
* 查询定时任务日志 * 查询定时任务异常日志
* *
* @param jobLogId 定时任务日志主键 * @param jobLogId 定时任务异常日志主键
* @return 定时任务日志 * @return 定时任务异常日志
*/ */
public SysJobLog selectSysJobLogByJobLogId(Long jobLogId); public JobErrorLog selectJobErrorLogByJobLogId(Long jobLogId);
/** /**
* 查询定时任务日志列表 * 查询定时任务异常日志列表
* *
* @param sysJobLog 定时任务日志 * @param jobErrorLog 定时任务异常日志
* @return 定时任务日志集合 * @return 定时任务异常日志集合
*/ */
public List<SysJobLog> selectSysJobLogList(SysJobLog sysJobLog); public List<JobErrorLog> selectJobErrorLogList(JobErrorLog jobErrorLog);
/** /**
* 新增定时任务日志 * 新增定时任务异常日志
* *
* @param sysJobLog 定时任务日志 * @param jobErrorLog 定时任务异常日志
* @return 结果 * @return 结果
*/ */
public int insertSysJobLog(SysJobLog sysJobLog); public int insertJobErrorLog(JobErrorLog jobErrorLog);
/** /**
* 修改定时任务日志 * 修改定时任务异常日志
* *
* @param sysJobLog 定时任务日志 * @param jobErrorLog 定时任务异常日志
* @return 结果 * @return 结果
*/ */
public int updateSysJobLog(SysJobLog sysJobLog); public int updateJobErrorLog(JobErrorLog jobErrorLog);
/** /**
* 删除定时任务日志 * 删除定时任务异常日志
* *
* @param jobLogId 定时任务日志主键 * @param jobLogId 定时任务异常日志主键
* @return 结果 * @return 结果
*/ */
public int deleteSysJobLogByJobLogId(Long jobLogId); public int deleteJobErrorLogByJobLogId(Long jobLogId);
/** /**
* 批量删除定时任务日志 * 批量删除定时任务异常日志
* *
* @param jobLogIds 需要删除的数据主键集合 * @param jobLogIds 需要删除的数据主键集合
* @return 结果 * @return 结果
*/ */
public int deleteSysJobLogByJobLogIds(Long[] jobLogIds); public int deleteJobErrorLogByJobLogIds(Long[] jobLogIds);
void cleanJobLog(); void cleanJobLog();
} }
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.SysJobLog; import share.system.domain.JobErrorLog;
import java.util.List; import java.util.List;
/** /**
* 定时任务日志Service接口 * 定时任务异常日志Service接口
* *
* @author wuwenlong * @author wuwenlong
* @date 2024-11-15 * @date 2024-11-18
*/ */
public interface SysJobLogService extends IService<SysJobLog> { public interface JobErrorLogService extends IService<JobErrorLog> {
/** /**
* 查询定时任务日志 * 查询定时任务异常日志
* *
* @param jobLogId 定时任务日志主键 * @param jobLogId 定时任务异常日志主键
* @return 定时任务日志 * @return 定时任务异常日志
*/ */
public SysJobLog selectSysJobLogByJobLogId(Long jobLogId); public JobErrorLog selectJobErrorLogByJobLogId(Long jobLogId);
/** /**
* 查询定时任务日志列表 * 查询定时任务异常日志列表
* *
* @param sysJobLog 定时任务日志 * @param jobErrorLog 定时任务异常日志
* @return 定时任务日志集合 * @return 定时任务异常日志集合
*/ */
public List<SysJobLog> selectSysJobLogList(SysJobLog sysJobLog); public List<JobErrorLog> selectJobErrorLogList(JobErrorLog jobErrorLog);
/** /**
* 新增定时任务日志 * 新增定时任务异常日志
* *
* @param sysJobLog 定时任务日志 * @param jobErrorLog 定时任务异常日志
* @return 结果 * @return 结果
*/ */
public int insertSysJobLog(SysJobLog sysJobLog); public int insertJobErrorLog(JobErrorLog jobErrorLog);
/** /**
* 修改定时任务日志 * 修改定时任务异常日志
* *
* @param sysJobLog 定时任务日志 * @param jobErrorLog 定时任务异常日志
* @return 结果 * @return 结果
*/ */
public int updateSysJobLog(SysJobLog sysJobLog); public int updateJobErrorLog(JobErrorLog jobErrorLog);
/** /**
* 批量删除定时任务日志 * 批量删除定时任务异常日志
* *
* @param jobLogIds 需要删除的定时任务日志主键集合 * @param jobLogIds 需要删除的定时任务异常日志主键集合
* @return 结果 * @return 结果
*/ */
public int deleteSysJobLogByJobLogIds(Long[] jobLogIds); public int deleteJobErrorLogByJobLogIds(Long[] jobLogIds);
/** /**
* 删除定时任务日志信息 * 删除定时任务异常日志信息
* *
* @param jobLogId 定时任务日志主键 * @param jobLogId 定时任务异常日志主键
* @return 结果 * @return 结果
*/ */
public int deleteSysJobLogByJobLogId(Long jobLogId); public int deleteJobErrorLogByJobLogId(Long jobLogId);
public void cleanJobLog(); void cleanJobLog();
} }
...@@ -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.SysJobLog; import share.system.domain.JobErrorLog;
import share.system.mapper.SysJobLogMapper; import share.system.mapper.JobErrorLogMapper;
import share.system.service.SysJobLogService; import share.system.service.JobErrorLogService;
import java.util.List; import java.util.List;
/** /**
* 定时任务日志Service业务层处理 * 定时任务异常日志Service业务层处理
* *
* @author wuwenlong * @author wuwenlong
* @date 2024-11-15 * @date 2024-11-18
*/ */
@Service @Service
public class SysJobLogServiceImpl extends ServiceImpl<SysJobLogMapper, SysJobLog> implements SysJobLogService { public class JobErrorLogServiceImpl extends ServiceImpl<JobErrorLogMapper, JobErrorLog> implements JobErrorLogService {
@Autowired @Autowired
private SysJobLogMapper sysJobLogMapper; private JobErrorLogMapper jobErrorLogMapper;
/** /**
* 查询定时任务日志 * 查询定时任务异常日志
* *
* @param jobLogId 定时任务日志主键 * @param jobLogId 定时任务异常日志主键
* @return 定时任务日志 * @return 定时任务异常日志
*/ */
@Override @Override
public SysJobLog selectSysJobLogByJobLogId(Long jobLogId) { public JobErrorLog selectJobErrorLogByJobLogId(Long jobLogId) {
return sysJobLogMapper.selectSysJobLogByJobLogId(jobLogId); return jobErrorLogMapper.selectJobErrorLogByJobLogId(jobLogId);
} }
/** /**
* 查询定时任务日志列表 * 查询定时任务异常日志列表
* *
* @param sysJobLog 定时任务日志 * @param jobErrorLog 定时任务异常日志
* @return 定时任务日志 * @return 定时任务异常日志
*/ */
@Override @Override
public List<SysJobLog> selectSysJobLogList(SysJobLog sysJobLog) { public List<JobErrorLog> selectJobErrorLogList(JobErrorLog jobErrorLog) {
return sysJobLogMapper.selectSysJobLogList(sysJobLog); return jobErrorLogMapper.selectJobErrorLogList(jobErrorLog);
} }
/** /**
* 新增定时任务日志 * 新增定时任务异常日志
* *
* @param sysJobLog 定时任务日志 * @param jobErrorLog 定时任务异常日志
* @return 结果 * @return 结果
*/ */
@Override @Override
public int insertSysJobLog(SysJobLog sysJobLog) { public int insertJobErrorLog(JobErrorLog jobErrorLog) {
sysJobLog.setCreateTime(DateUtils.getNowDate()); jobErrorLog.setCreateTime(DateUtils.getNowDate());
return sysJobLogMapper.insertSysJobLog(sysJobLog); return jobErrorLogMapper.insertJobErrorLog(jobErrorLog);
} }
/** /**
* 修改定时任务日志 * 修改定时任务异常日志
* *
* @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 deleteSysJobLogByJobLogIds(Long[] jobLogIds) { public int deleteJobErrorLogByJobLogIds(Long[] jobLogIds) {
return sysJobLogMapper.deleteSysJobLogByJobLogIds(jobLogIds); return jobErrorLogMapper.deleteJobErrorLogByJobLogIds(jobLogIds);
} }
/** /**
* 删除定时任务日志信息 * 删除定时任务异常日志信息
* *
* @param jobLogId 定时任务日志主键 * @param jobLogId 定时任务异常日志主键
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteSysJobLogByJobLogId(Long jobLogId) { public int deleteJobErrorLogByJobLogId(Long jobLogId) {
return sysJobLogMapper.deleteSysJobLogByJobLogId(jobLogId); return jobErrorLogMapper.deleteJobErrorLogByJobLogId(jobLogId);
} }
@Override @Override
public void cleanJobLog() { public void cleanJobLog() {
sysJobLogMapper.cleanJobLog(); jobErrorLogMapper.cleanJobLog();
} }
} }
...@@ -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.SysJobLogMapper"> <mapper namespace="share.system.mapper.JobErrorLogMapper">
<resultMap type="SysJobLog" id="SysJobLogResult"> <resultMap type="JobErrorLog" id="JobErrorLogResult">
<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="selectSysJobLogVo"> <sql id="selectJobErrorLogVo">
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="selectSysJobLogList" parameterType="SysJobLog" resultMap="SysJobLogResult"> <select id="selectJobErrorLogList" parameterType="JobErrorLog" resultMap="JobErrorLogResult">
<include refid="selectSysJobLogVo"/> <include refid="selectJobErrorLogVo"/>
<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="selectSysJobLogByJobLogId" parameterType="Long" resultMap="SysJobLogResult"> <select id="selectJobErrorLogByJobLogId" parameterType="Long" resultMap="JobErrorLogResult">
<include refid="selectSysJobLogVo"/> <include refid="selectJobErrorLogVo"/>
where job_log_id = #{jobLogId} where job_log_id = #{jobLogId}
</select> </select>
<insert id="insertSysJobLog" parameterType="SysJobLog" useGeneratedKeys="true" keyProperty="jobLogId"> <insert id="insertJobErrorLog" parameterType="JobErrorLog" useGeneratedKeys="true" keyProperty="jobLogId">
insert into sys_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="updateSysJobLog" parameterType="SysJobLog"> <update id="updateJobErrorLog" parameterType="JobErrorLog">
update sys_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="deleteSysJobLogByJobLogId" parameterType="Long"> <delete id="deleteJobErrorLogByJobLogId" parameterType="Long">
delete delete
from sys_job_log from s_job_error_log
where job_log_id = #{jobLogId} where job_log_id = #{jobLogId}
</delete> </delete>
<delete id="deleteSysJobLogByJobLogIds" parameterType="String"> <delete id="deleteJobErrorLogByJobLogIds" parameterType="String">
delete from sys_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 sys_job_log truncate table s_job_error_log
</update> </update>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment