2024-10-18 13:51:40 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
2024-10-18 22:25:06 +08:00
|
|
|
<mapper namespace="cn.bunny.services.mapper.ScheduleExecuteLogMapper">
|
2024-10-18 13:51:40 +08:00
|
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
2024-10-18 22:25:06 +08:00
|
|
|
<resultMap id="BaseResultMap" type="cn.bunny.dao.entity.log.ScheduleExecuteLog">
|
2024-10-18 16:57:21 +08:00
|
|
|
<id column="id" property="id"/>
|
|
|
|
<id column="create_time" property="createTime"/>
|
|
|
|
<id column="update_time" property="updateTime"/>
|
|
|
|
<id column="create_user" property="createUser"/>
|
|
|
|
<id column="update_user" property="updateUser"/>
|
|
|
|
<id column="is_deleted" property="isDeleted"/>
|
|
|
|
<id column="job_name" property="jobName"/>
|
|
|
|
<id column="job_group" property="jobGroup"/>
|
|
|
|
<id column="job_class_name" property="jobClassName"/>
|
|
|
|
<id column="cron_expression" property="cronExpression"/>
|
|
|
|
<id column="trigger_name" property="triggerName"/>
|
|
|
|
<id column="execute_result" property="executeResult"/>
|
|
|
|
<id column="duration" property="duration"/>
|
2024-10-18 13:51:40 +08:00
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
|
<sql id="Base_Column_List">
|
2024-10-21 16:45:59 +08:00
|
|
|
id, create_time, update_time, create_user, update_user, is_deleted, job_name, job_group, job_class_name, cron_expression, trigger_name, execute_result, duration
|
2024-10-18 13:51:40 +08:00
|
|
|
</sql>
|
|
|
|
|
|
|
|
<!-- 分页查询调度任务执行日志内容 -->
|
2024-10-31 10:01:58 +08:00
|
|
|
<select id="selectListByPage" resultType="cn.bunny.dao.vo.log.QuartzExecuteLogVo">
|
2024-10-18 13:51:40 +08:00
|
|
|
select
|
2024-10-31 10:01:58 +08:00
|
|
|
log.*,
|
|
|
|
create_user.username as create_username,
|
|
|
|
update_user.username as update_username
|
|
|
|
from log_quartz_execute log
|
|
|
|
left join sys_user create_user on create_user.id = log.create_user
|
|
|
|
left join sys_user update_user on update_user.id = log.update_user
|
2024-10-18 13:51:40 +08:00
|
|
|
<where>
|
2024-10-31 10:01:58 +08:00
|
|
|
log.is_deleted = 0
|
2024-10-18 16:57:21 +08:00
|
|
|
<if test="dto.jobName != null and dto.jobName != ''">
|
2024-10-31 10:01:58 +08:00
|
|
|
and log.job_name like CONCAT('%',#{dto.jobName},'%')
|
2024-10-18 16:57:21 +08:00
|
|
|
</if>
|
|
|
|
<if test="dto.jobGroup != null and dto.jobGroup != ''">
|
2024-10-31 10:01:58 +08:00
|
|
|
and log.job_group like CONCAT('%',#{dto.jobGroup},'%')
|
2024-10-18 16:57:21 +08:00
|
|
|
</if>
|
|
|
|
<if test="dto.jobClassName != null and dto.jobClassName != ''">
|
2024-10-31 10:01:58 +08:00
|
|
|
and log.job_class_name like CONCAT('%',#{dto.jobClassName},'%')
|
2024-10-18 16:57:21 +08:00
|
|
|
</if>
|
|
|
|
<if test="dto.cronExpression != null and dto.cronExpression != ''">
|
2024-10-31 10:01:58 +08:00
|
|
|
and log.cron_expression like CONCAT('%',#{dto.cronExpression},'%')
|
2024-10-18 16:57:21 +08:00
|
|
|
</if>
|
|
|
|
<if test="dto.triggerName != null and dto.triggerName != ''">
|
2024-10-31 10:01:58 +08:00
|
|
|
and log.trigger_name like CONCAT('%',#{dto.triggerName},'%')
|
2024-10-18 16:57:21 +08:00
|
|
|
</if>
|
2024-10-18 13:51:40 +08:00
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<!-- 物理删除调度任务执行日志 -->
|
|
|
|
<delete id="deleteBatchIdsWithPhysics">
|
|
|
|
delete
|
2024-10-18 16:57:21 +08:00
|
|
|
from log_quartz_execute
|
2024-10-18 13:51:40 +08:00
|
|
|
where id in
|
|
|
|
<foreach collection="ids" item="id" open="(" close=")" separator=",">
|
|
|
|
#{id}
|
|
|
|
</foreach>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
</mapper>
|