|
|
|
<?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.ModelAtomicIndexMapper">
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectAll" resultType="com.supervision.police.domain.ModelAtomicIndex">
|
|
|
|
select * from model_atomic_index mai
|
|
|
|
where data_status = '1'
|
|
|
|
<if test="index.name != null and index.name != ''">
|
|
|
|
and name like concat('%',#{index.name},'%')
|
|
|
|
</if>
|
|
|
|
<if test="index.remark != null and index.remark != ''">
|
|
|
|
and remark = #{index.remark}
|
|
|
|
</if>
|
|
|
|
<if test="index.caseType != null and index.caseType != ''">
|
|
|
|
and case_type = #{index.caseType}
|
|
|
|
</if>
|
|
|
|
<if test="index.indexSource != null and index.indexSource != ''">
|
|
|
|
and index_source = #{index.indexSource}
|
|
|
|
</if>
|
|
|
|
<if test="index.recordType != null and index.recordType != ''">
|
|
|
|
and record_type = #{index.recordType}
|
|
|
|
</if>
|
|
|
|
<if test="index.updateStartTime != null">
|
|
|
|
and DATE_FORMAT(update_time, '%Y-%m-%d') >= DATE_FORMAT(#{index.updateStartTime}, '%Y-%m-%d')
|
|
|
|
</if>
|
|
|
|
<if test="index.updateEndTime != null">
|
|
|
|
and DATE_FORMAT(update_time, '%Y-%m-%d') <= DATE_FORMAT(#{index.updateEndTime}, '%Y-%m-%d')
|
|
|
|
</if>
|
|
|
|
order by update_time desc
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectByCaseType" resultType="com.supervision.police.domain.ModelAtomicIndex">
|
|
|
|
select * from model_atomic_index where data_status = '1' and case_type = #{caseType}
|
|
|
|
</select>
|
|
|
|
<select id="listCaseAtomicIndex" resultType="com.supervision.police.domain.ModelAtomicIndex">
|
|
|
|
select *
|
|
|
|
from model_atomic_index
|
|
|
|
where data_status = '1'
|
|
|
|
<if test="indexIdList != null and indexIdList.size() > 0">
|
|
|
|
and id in
|
|
|
|
<foreach collection="indexIdList" item="indexId" open="(" separator="," close=")">
|
|
|
|
#{indexId}
|
|
|
|
</foreach>
|
|
|
|
</if>
|
|
|
|
<if test="caseType != null and caseType != ''">
|
|
|
|
and case_type = #{caseType}
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="indexSource != null and indexSource != ''">
|
|
|
|
and index_source = #{indexSource}
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
</mapper>
|