DictFileMapper.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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.manage.mapper.IDictFileMapper">
  4. <select id="pageList" resultType="com.fdkankan.manage.vo.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. where df.rec_status = 'A'
  9. <if test="param.sysUserId != null">
  10. and ( df.sys_user_id = #{param.sysUserId} or df.use_type = 'animation' )
  11. </if>
  12. <if test="param.name != null and param.name !=''">
  13. and df.name like concat('%',#{param.name}, '%')
  14. </if>
  15. <if test="param.typeKey != null and param.typeKey !=''">
  16. and df.type_key = #{param.typeKey}
  17. </if>
  18. <if test="param.useType != null and param.useType !=''">
  19. and df.use_type = #{param.useType}
  20. </if>
  21. <if test="param.fileType != null">
  22. and cu.file_type = #{param.fileType}
  23. </if>
  24. <if test="param.dictId != null">
  25. and df.dict_id = #{param.dictId}
  26. </if>
  27. <if test="param.fileFormats != null and param.fileFormats.size>0">
  28. and cu.file_format in
  29. <foreach collection="param.fileFormats" item="fileFormat" open="(" separator="," close=")">
  30. #{fileFormat}
  31. </foreach>
  32. </if>
  33. <if test="param.fileTypes != null and param.fileTypes.size>0">
  34. and cu.file_type in
  35. <foreach collection="param.fileTypes" item="type" open="(" separator="," close=")">
  36. #{type}
  37. </foreach>
  38. </if>
  39. <if test="param.dictIds != null and param.dictIds.size>0">
  40. and df.dict_id in
  41. <foreach collection="param.dictIds" item="dict" open="(" separator="," close=")">
  42. #{dict}
  43. </foreach>
  44. </if>
  45. order by df.id desc
  46. </select>
  47. <select id="traceEvidenceInfoList" resultType="com.fdkankan.manage.vo.response.DictFileVo">
  48. SELECT * from t_dict_file df
  49. LEFT JOIN t_dict d on df.dict_id = d.id
  50. LEFT JOIN t_common_upload cu on df.upload_id = cu.id
  51. where df.rec_status = 'A' and d.use_type = 'trace_evidence'
  52. <if test="param.name != null and param.name !=''">
  53. and df.name like concat('%',#{param.name}, '%')
  54. </if>
  55. <if test="param.typeKey != null and param.typeKey !=''">
  56. and df.type_key = #{param.typeKey}
  57. </if>
  58. <if test="param.useType != null and param.useType !=''">
  59. and df.use_type = #{param.useType}
  60. </if>
  61. <if test="param.fileType != null">
  62. and cu.file_type = #{param.fileType}
  63. </if>
  64. <if test="param.dictId != null">
  65. and df.dict_id = #{param.dictId}
  66. </if>
  67. <if test="param.fileFormats != null and param.fileFormats.size>0">
  68. and cu.file_format in
  69. <foreach collection="param.fileFormats" item="fileFormat" open="(" separator="," close=")">
  70. #{fileFormat}
  71. </foreach>
  72. </if>
  73. <if test="param.fileTypes != null and param.fileTypes.size>0">
  74. and cu.file_type in
  75. <foreach collection="param.fileTypes" item="type" open="(" separator="," close=")">
  76. #{type}
  77. </foreach>
  78. </if>
  79. <if test="param.dictIds != null and param.dictIds.size>0">
  80. and df.dict_id in
  81. <foreach collection="param.dictIds" item="dict" open="(" separator="," close=")">
  82. #{dict}
  83. </foreach>
  84. </if>
  85. <if test="param.dictFileIds == null or param.dictFileIds.size==0">
  86. and df.sys_user_id = #{param.sysUserId}
  87. </if>
  88. <if test="(param.kno == null or param.kno=='') and param.dictFileIds != null and param.dictFileIds.size>0">
  89. and ( df.sys_user_id = #{param.sysUserId} or
  90. df.id in
  91. <foreach collection="param.dictFileIds" item="dictFileId" open="(" separator="," close=")">
  92. #{dictFileId}
  93. </foreach>
  94. )
  95. </if>
  96. <if test="param.kno != null and param.kno!='' and param.dictFileIds != null and param.dictFileIds.size>0">
  97. and df.id in
  98. <foreach collection="param.dictFileIds" item="dictFileId" open="(" separator="," close=")">
  99. #{dictFileId}
  100. </foreach>
  101. </if>
  102. order by df.id desc
  103. </select>
  104. </mapper>