33 lines
1.4 KiB
XML
33 lines
1.4 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="cn.iocoder.yudao.module.inspection.mapper.InspectionFileMapper">
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
<select id="selectInspectionFileList" resultType="cn.iocoder.yudao.module.inspection.entity.InspectionFile">
|
||
|
|
select * from inspection_file
|
||
|
|
<where>
|
||
|
|
and partner_id = #{partnerId}
|
||
|
|
<choose>
|
||
|
|
<when test="fatherId != null and fatherId != ''">
|
||
|
|
and father_id = #{fatherId}
|
||
|
|
</when>
|
||
|
|
<otherwise>
|
||
|
|
and father_id is null
|
||
|
|
</otherwise>
|
||
|
|
</choose>
|
||
|
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
||
|
|
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
|
||
|
|
<if test="params.beginWarnTime != null and params.beginWarnTime != '' and params.endWarnTime != null and params.endWarnTime != ''"> and warn_time between #{params.beginWarnTime} and #{params.endWarnTime}</if>
|
||
|
|
</where>
|
||
|
|
order by `type` ASC,create_time desc
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectInspectionFileById" resultType="cn.iocoder.yudao.module.inspection.entity.InspectionFile">
|
||
|
|
select * from inspection_file
|
||
|
|
where id = #{id}
|
||
|
|
</select>
|
||
|
|
</mapper>
|