SysPosterMapper.xml 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ydtech.modules.admin.dao.SysPosterMapper">
  6. <sql id="Base_Column_List">
  7. SELECT
  8. sp.id,type,title,file_id,iuf.url,iuf.update_time,iuf.username
  9. FROM sys_poster sp,
  10. ins_upload_files iuf
  11. </sql>
  12. <sql id="Base_Where">
  13. <where>
  14. 1=1
  15. AND
  16. sp.file_id = iuf.id
  17. <if test="sysPoster.type != null and sysPoster.type != ''">
  18. AND type = #{sysPoster.type}
  19. </if>
  20. <if test="sysPoster.title != null and sysPoster.title != ''">
  21. AND title like CONCAT('%', #{sysPoster.title}, '%')
  22. </if>
  23. </where>
  24. </sql>
  25. <select id="posterList" resultType="com.ydtech.modules.admin.model.SysPoster">
  26. <include refid="Base_Column_List"/>
  27. <include refid="Base_Where"/>
  28. ORDER BY update_time DESC
  29. </select>
  30. </mapper>