FileMapper.xml 1.3 KB

12345678910111213141516171819202122232425262728293031
  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.tofly.feesapi.file.mapper.FileMapper">
  4. <resultMap id="fileMap" type="com.tofly.feesapi.file.entity.File">
  5. <id property="id" column="ID"/>
  6. <result property="tableName" column="TABLE_NAME"/>
  7. <result property="tableBh" column="TABLE_BH"/>
  8. <result property="fileXh" column="FILE_XH"/>
  9. <result property="fileNote" column="FILE_NOTE"/>
  10. <result property="fileOldFn" column="FILE_OLD_FN"/>
  11. <result property="fileNewFn" column="FILE_NEW_FN"/>
  12. <result property="fileSize" column="FILE_SIZE"/>
  13. <result property="czry" column="CZRY"/>
  14. <result property="czsj" column="CZSJ"/>
  15. </resultMap>
  16. <select id="getFileList" resultMap="fileMap">
  17. select * from sys_upfiles
  18. <where>
  19. <if test="tableids != null">
  20. and table_bh in
  21. <foreach item="fileId" collection="tableids.split(',')" open="(" separator="," close=")">
  22. #{fileId}
  23. </foreach>
  24. </if>
  25. <if test="tableName != null">
  26. and table_name = #{tableName}
  27. </if>
  28. </where>
  29. </select>
  30. </mapper>