linwe
2024-09-03 764d883b5ea3bdc06abbec548b6df0511e567978
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?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="org.springblade.modules.threeColorTask.mapper.CustomTaskMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="customTaskResultMap" type="org.springblade.modules.threeColorTask.entity.CustomTaskEntity">
    </resultMap>
 
 
    <select id="selectCustomTaskPage" resultMap="customTaskResultMap">
        <include refid="selectCustomTask"/>
        <where>
            <if test="customTask.id != null "> and id = #{customTask.id}</if>
            <if test="customTask.name != null  and customTask.name != ''"> and name = #{customTask.name}</if>
            <if test="customTask.taskType != null  and customTask.taskType != ''"> and task_type = #{customTask.taskType}</if>
            <if test="customTask.labelId != null "> and label_id = #{customTask.labelId}</if>
            <if test="customTask.labelColor != null  and customTask.labelColor != ''"> and label_color = #{customTask.labelColor}</if>
            <if test="customTask.placeLabel != null "> and place_label = #{placeLabel}</if>
            <if test="customTask.placeSmallLabel != null  and customTask.placeSmallLabel != ''"> and place_small_label = #{customTask.placeSmallLabel}</if>
            <if test="customTask.nineType != null "> and nineType = #{customTask.nineType}</if>
            <if test="customTask.deleteFlag != null "> and delete_flag = #{customTask.deleteFlag}</if>
            <if test="customTask.updateTime != null "> and update_time = #{customTask.updateTime}</if>
            <if test="customTask.createTime != null "> and create_time = #{customTask.createTime}</if>
            <if test="customTask.createBy != null "> and create_by = #{customTask.createBy}</if>
            <if test="customTask.updateBy != null "> and update_by = #{customTask.updateBy}</if>
            <if test="customTask.cron != null  and customTask.cron != ''"> and cron = #{customTask.cron}</if>
            <if test="customTask.taskStatus != null  and customTask.taskStatus != ''"> and task_status = #{customTask.taskStatus}</if>
            <if test="customTask.jobId != null "> and job_id = #{customTask.jobId}</if>
        </where>
    </select>
 
 
    <resultMap type="org.springblade.modules.threeColorTask.dto.CustomTaskDTO" id="CustomTaskDTOResult">
        <result property="id"    column="id"    />
        <result property="name"    column="name"    />
        <result property="taskType"    column="task_type"    />
        <result property="labelId"    column="label_id"    />
        <result property="labelColor"    column="label_color"    />
        <result property="placeLabel"    column="place_label"    />
        <result property="placeSmallLabel"    column="place_small_label"    />
        <result property="nineType"    column="nineType"    />
        <result property="deleteFlag"    column="delete_flag"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createTime"    column="create_time"    />
        <result property="createBy"    column="create_by"    />
        <result property="updateBy"    column="update_by"    />
        <result property="cron"    column="cron"    />
        <result property="taskStatus"    column="task_status"    />
        <result property="taskRange"    column="task_range"    />
        <result property="jobId"    column="job_id"    />
    </resultMap>
 
    <sql id="selectCustomTask">
        select
            id,
            name,
            task_type,
            label_id,
            label_color,
            place_label,
            place_small_label,
            nineType,
            delete_flag,
            update_time,
            create_time,
            create_by,
            update_by,
            cron,
            task_range,
            task_status,
            job_id
        from
            jczz_three_color_task
    </sql>
 
    <select id="selectCustomTaskById" parameterType="int" resultMap="CustomTaskDTOResult">
        <include refid="selectCustomTask"/>
        where
        id = #{id}
    </select>
 
    <select id="selectCustomTaskList" parameterType="org.springblade.modules.threeColorTask.dto.CustomTaskDTO" resultMap="CustomTaskDTOResult">
        <include refid="selectCustomTask"/>
        <where>
            <if test="id != null "> and id = #{id}</if>
            <if test="name != null  and name != ''"> and name = #{name}</if>
            <if test="taskType != null  and taskType != ''"> and task_type = #{taskType}</if>
            <if test="labelId != null "> and label_id = #{labelId}</if>
            <if test="labelColor != null  and labelColor != ''"> and label_color = #{labelColor}</if>
            <if test="placeLabel != null "> and place_label = #{placeLabel}</if>
            <if test="placeSmallLabel != null  and placeSmallLabel != ''"> and place_small_label = #{placeSmallLabel}</if>
            <if test="nineType != null "> and nineType = #{nineType}</if>
            <if test="deleteFlag != null "> and delete_flag = #{deleteFlag}</if>
            <if test="updateTime != null "> and update_time = #{updateTime}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="createBy != null "> and create_by = #{createBy}</if>
            <if test="updateBy != null "> and update_by = #{updateBy}</if>
            <if test="cron != null  and cron != ''"> and cron = #{cron}</if>
            <if test="taskRange != null  and taskRange != ''"> and task_range = #{taskRange}</if>
            <if test="taskStatus != null  and taskStatus != ''"> and task_status = #{taskStatus}</if>
            <if test="jobId != null "> and job_id = #{jobId}</if>
        </where>
    </select>
 
</mapper>