<?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.customTask.mapper.CustomTaskMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="customTaskResultMap" type="org.springblade.modules.customTask.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.customTask.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="jobId" column="job_id" />
|
</resultMap>
|
|
<sql id="selectCustomTask">
|
select
|
id,
|
name,
|
task_type,
|
label_id,
|
label_color,
|
category_id,
|
nineType,
|
delete_flag,
|
update_time,
|
create_time,
|
create_by,
|
update_by
|
from
|
jczz_custom_task
|
</sql>
|
|
<select id="selectCustomTaskById" parameterType="int" resultMap="CustomTaskDTOResult">
|
<include refid="selectCustomTask"/>
|
where
|
id = #{id}
|
</select>
|
|
<select id="selectCustomTaskList" parameterType="org.springblade.modules.customTask.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="categoryId != null "> and category_id = #{categoryId}</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>
|
</where>
|
</select>
|
|
</mapper>
|