You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
2.5 KiB
XML
53 lines
2.5 KiB
XML
<?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.supervision.police.mapper.TaskRecordMapper">
|
|
|
|
<resultMap id="BaseResultMap" type="com.supervision.police.domain.TaskRecord">
|
|
<id property="id" column="id" jdbcType="VARCHAR"/>
|
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
|
<result property="caseId" column="case_id" jdbcType="VARCHAR"/>
|
|
<result property="recordId" column="record_id" jdbcType="VARCHAR"/>
|
|
<result property="evidenceId" column="evidence_id" jdbcType="VARCHAR"/>
|
|
<result property="type" column="type" jdbcType="VARCHAR"/>
|
|
<result property="status" column="status" jdbcType="VARCHAR"/>
|
|
<result property="cancelTime" column="cancel_time" jdbcType="TIMESTAMP"/>
|
|
<result property="createUserId" column="create_user_id" jdbcType="VARCHAR"/>
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
<result property="updateUserId" column="update_user_id" jdbcType="VARCHAR"/>
|
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
</resultMap>
|
|
|
|
<sql id="Base_Column_List">
|
|
id,name,case_id,
|
|
record_id,evidence_id,type,
|
|
status,cancel_time,create_user_id,
|
|
create_time,update_user_id,update_time,
|
|
batch_no
|
|
</sql>
|
|
<select id="queryTaskList" resultType="com.supervision.police.dto.TaskInfoDTO">
|
|
select t.id as taskId,
|
|
t.case_id as caseId,
|
|
c.case_name as caseName,
|
|
t.name as taskName,
|
|
t.status as taskStatus,
|
|
t.create_time as createTime,
|
|
t.cancel_time as cancelTime,
|
|
t.create_user_id as createUserId,
|
|
p.name as createUserName
|
|
from task_record t
|
|
left join model_case c on t.case_id = c.id
|
|
left join case_person p on t.create_user_id = p.id
|
|
<where>
|
|
<if test="taskInfo.caseName != null and taskInfo.caseName != ''">
|
|
and c.case_name like concat('%',#{taskInfo.caseName},'%')
|
|
</if>
|
|
<if test="taskInfo.taskStatus != null and taskInfo.taskStatus != ''">
|
|
and t.status = #{taskInfo.taskStatus}
|
|
</if>
|
|
</where>
|
|
order by c.create_time ${taskInfo.createTimeSorted} ,t.create_time ${taskInfo.cancelTimeSorted}
|
|
</select>
|
|
</mapper>
|