1.0
xin
2025-04-15 e718afd02965c6a4018506acb1ae99baca0c5645
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?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" >
<mapper namespace="com.oying.modules.quartz.mapper.QuartzLogMapper">
 
    <resultMap id="BaseResultMap" type="com.oying.modules.quartz.domain.QuartzLog">
        <id column="log_id" property="id" jdbcType="BIGINT"/>
        <result column="job_name" property="jobName" jdbcType="VARCHAR"/>
        <result column="bean_name" property="beanName" jdbcType="VARCHAR"/>
        <result column="method_name" property="methodName" jdbcType="VARCHAR"/>
        <result column="params" property="params" jdbcType="VARCHAR"/>
        <result column="cron_expression" property="cronExpression" jdbcType="VARCHAR"/>
        <result column="is_success" property="isSuccess" jdbcType="VARCHAR"/>
        <result column="exception_detail" property="exceptionDetail" jdbcType="BIGINT"/>
        <result column="time" property="time" jdbcType="BIGINT"/>
        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
    </resultMap>
 
    <sql id="Base_Column_List">
        log_id, job_name, bean_name, method_name, params, cron_expression, is_success, exception_detail, time, create_time
    </sql>
 
    <select id="findAll" resultMap="BaseResultMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM sys_quartz_log
        <where>
            <if test="criteria.jobName != null and criteria.jobName != ''">
                AND job_name LIKE CONCAT('%',#{criteria.jobName},'%')
            </if>
            <if test="criteria.isSuccess != null">
                AND is_success = #{criteria.isSuccess}
            </if>
            <if test="criteria.createTime != null and criteria.createTime.size() > 0">
                AND create_time BETWEEN #{criteria.createTime[0]} AND #{criteria.createTime[1]}
            </if>
        </where>
        ORDER BY log_id DESC
    </select>
 
</mapper>