1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?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.fusion.mapper.IDictFileMapper">
- <select id="pageList" resultType="com.fdkankan.fusion.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
- left join tm_user u on df.sys_user_id = u.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.deptId != null and param.deptId != ''">
- and ( u.dept_id = #{param.deptId} 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.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.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>
- </mapper>
|