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.
fu-hsi-service/src/main/resources/mapper/ModelAtomicIndexMapper.xml

55 lines
2.3 KiB
XML

10 months ago
<?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">
10 months ago
10 months ago
<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 != ''">
9 months ago
and name like concat('%',#{index.name},'%')
10 months ago
</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') &lt;= DATE_FORMAT(#{index.updateEndTime}, '%Y-%m-%d')
</if>
9 months ago
order by update_time desc
10 months ago
</select>
10 months ago
10 months ago
<select id="selectByCaseType" resultType="com.supervision.police.domain.ModelAtomicIndex">
select * from model_atomic_index where data_status = '1' and case_type = #{caseType}
</select>
10 months ago
<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>
10 months ago
</mapper>