| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <?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.fdkankan.manage.mapper.IDictFileMapper">
- <select id="pageList" resultType="com.fdkankan.manage.vo.response.DictFileVo">
- SELECT * from t_dict_file df
- LEFT JOIN t_dict d on df.dict_id = d.id
- LEFT JOIN t_common_upload cu on df.upload_id = cu.id
- where df.rec_status = 'A'
- <if test="param.sysUserId != null">
- and ( df.sys_user_id = #{param.sysUserId} or df.use_type = 'animation' )
- </if>
- <if test="param.name != null and param.name !=''">
- and df.name like concat('%',#{param.name}, '%')
- </if>
- <if test="param.typeKey != null and param.typeKey !=''">
- and df.type_key = #{param.typeKey}
- </if>
- <if test="param.useType != null and param.useType !=''">
- and df.use_type = #{param.useType}
- </if>
- <if test="param.fileType != null">
- and cu.file_type = #{param.fileType}
- </if>
- <if test="param.dictId != null">
- and df.dict_id = #{param.dictId}
- </if>
- <if test="param.fileFormats != null and param.fileFormats.size>0">
- and cu.file_format in
- <foreach collection="param.fileFormats" item="fileFormat" open="(" separator="," close=")">
- #{fileFormat}
- </foreach>
- </if>
- <if test="param.fileTypes != null and param.fileTypes.size>0">
- and cu.file_type in
- <foreach collection="param.fileTypes" item="type" open="(" separator="," close=")">
- #{type}
- </foreach>
- </if>
- <if test="param.dictIds != null and param.dictIds.size>0">
- and df.dict_id in
- <foreach collection="param.dictIds" item="dict" open="(" separator="," close=")">
- #{dict}
- </foreach>
- </if>
- order by df.id desc
- </select>
- <select id="traceEvidenceInfoList" resultType="com.fdkankan.manage.vo.response.DictFileVo">
- SELECT * from t_dict_file df
- LEFT JOIN t_dict d on df.dict_id = d.id
- LEFT JOIN t_common_upload cu on df.upload_id = cu.id
- where df.rec_status = 'A' and d.use_type = 'trace_evidence'
- <if test="param.name != null and param.name !=''">
- and df.name like concat('%',#{param.name}, '%')
- </if>
- <if test="param.typeKey != null and param.typeKey !=''">
- and df.type_key = #{param.typeKey}
- </if>
- <if test="param.useType != null and param.useType !=''">
- and df.use_type = #{param.useType}
- </if>
- <if test="param.fileType != null">
- and cu.file_type = #{param.fileType}
- </if>
- <if test="param.dictId != null">
- and df.dict_id = #{param.dictId}
- </if>
- <if test="param.fileFormats != null and param.fileFormats.size>0">
- and cu.file_format in
- <foreach collection="param.fileFormats" item="fileFormat" open="(" separator="," close=")">
- #{fileFormat}
- </foreach>
- </if>
- <if test="param.fileTypes != null and param.fileTypes.size>0">
- and cu.file_type in
- <foreach collection="param.fileTypes" item="type" open="(" separator="," close=")">
- #{type}
- </foreach>
- </if>
- <if test="param.dictIds != null and param.dictIds.size>0">
- and df.dict_id in
- <foreach collection="param.dictIds" item="dict" open="(" separator="," close=")">
- #{dict}
- </foreach>
- </if>
- <if test="param.dictFileIds == null or param.dictFileIds.size==0">
- and df.sys_user_id = #{param.sysUserId}
- </if>
- <if test="(param.kno == null or param.kno=='') and param.dictFileIds != null and param.dictFileIds.size>0">
- and ( df.sys_user_id = #{param.sysUserId} or
- df.id in
- <foreach collection="param.dictFileIds" item="dictFileId" open="(" separator="," close=")">
- #{dictFileId}
- </foreach>
- )
- </if>
- <if test="param.kno != null and param.kno!='' and param.dictFileIds != null and param.dictFileIds.size>0">
- and df.id in
- <foreach collection="param.dictFileIds" item="dictFileId" open="(" separator="," close=")">
- #{dictFileId}
- </foreach>
- </if>
- order by df.id desc
- </select>
- </mapper>
|