<?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.sinata.system.mapper.MwRegulatoryRecordMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.sinata.system.domain.MwRegulatoryRecord">
|
<id column="ID" property="id" />
|
<result column="DEL_FLAG" property="delFlag" />
|
<result column="CREATE_BY" property="createBy" />
|
<result column="CREATE_TIME" property="createTime" />
|
<result column="UPDATE_BY" property="updateBy" />
|
<result column="UPDATE_TIME" property="updateTime" />
|
<result column="DEPARTMENT_ID" property="departmentId" />
|
<result column="CHECK_DATE" property="checkDate" />
|
<result column="CHECK_BY" property="checkBy" />
|
<result column="CODE_TYPE" property="codeType" />
|
<result column="CHECK_RESULTS" property="checkResults" />
|
<result column="IMAGE_URL" property="imageUrl" />
|
<result column="ATTACHMENT" property="attachment" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
DEL_FLAG,
|
CREATE_BY,
|
CREATE_TIME,
|
UPDATE_BY,
|
UPDATE_TIME,
|
ID, DEPARTMENT_ID, CHECK_DATE, CHECK_BY, CODE_TYPE, CHECK_RESULTS, IMAGE_URL, ATTACHMENT
|
</sql>
|
<select id="pageList" resultType="com.sinata.system.domain.vo.MwRegulatoryRecordVO">
|
SELECT MRR.ID,
|
MRR.DEPARTMENT_ID,
|
MRR.CHECK_DATE,
|
MRR.CHECK_BY,
|
MRR.CODE_TYPE,
|
MRR.CHECK_RESULTS,
|
MRR.IMAGE_URL,
|
SD.DEPARTMENT_NAME
|
FROM MW_REGULATORY_RECORD MRR
|
LEFT JOIN SYS_DEPARTMENT SD ON SD.ID = MRR.DEPARTMENT_ID
|
<where>
|
MRR.DEL_FLAG = 0
|
<if test="treeCode != null and treeCode != ''">
|
AND SD.TREE_CODE LIKE CONCAT(#{treeCode},'%')
|
</if>
|
<if test="query.codeType != null">
|
AND MRR.CODE_TYPE = #{query.codeType}
|
</if>
|
<if test="query.startTime != null and query.endTime != null">
|
AND MRR.CHECK_DATE BETWEEN #{query.startTime} AND #{query.endTime}
|
</if>
|
</where>
|
</select>
|
|
</mapper>
|