DictFileMapper.xml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.fdkankan.fusion.mapper.IDictFileMapper">
  4. <select id="pageList" resultType="com.fdkankan.fusion.response.DictFileVo">
  5. SELECT * from t_dict_file df
  6. LEFT JOIN t_dict d on df.dict_id = d.id
  7. LEFT JOIN t_common_upload cu on df.upload_id = cu.id
  8. left join tm_user u on df.sys_user_id = u.id
  9. where df.rec_status = 'A'
  10. <if test="param.sysUserId != null">
  11. and ( df.sys_user_id = #{param.sysUserId} or df.use_type = 'animation')
  12. </if>
  13. <if test="param.deptId != null and param.deptId != ''">
  14. and ( u.dept_id = #{param.deptId} or df.use_type = 'animation')
  15. </if>
  16. <if test="param.name != null and param.name !=''">
  17. and df.name like concat('%',#{param.name}, '%')
  18. </if>
  19. <if test="param.typeKey != null and param.typeKey !=''">
  20. and df.type_key = #{param.typeKey}
  21. </if>
  22. <if test="param.fileType != null">
  23. and cu.file_type = #{param.fileType}
  24. </if>
  25. <if test="param.dictId != null">
  26. and df.dict_id = #{param.dictId}
  27. </if>
  28. <if test="param.fileFormats != null and param.fileFormats.size>0">
  29. and cu.file_format in
  30. <foreach collection="param.fileFormats" item="fileFormat" open="(" separator="," close=")">
  31. #{fileFormat}
  32. </foreach>
  33. </if>
  34. <if test="param.dictIds != null and param.dictIds.size>0">
  35. and df.dict_id in
  36. <foreach collection="param.dictIds" item="dict" open="(" separator="," close=")">
  37. #{dict}
  38. </foreach>
  39. </if>
  40. order by df.id desc
  41. </select>
  42. </mapper>