FeedbackMapper.xml 1.4 KB

1234567891011121314151617181920212223242526272829
  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.juxiao.xchat.module.xbd.mapper.system.FeedbackMapper" >
  4. <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.system.Feedback" >
  5. <id column="uid" property="uid" jdbcType="BIGINT" />
  6. <result column="erban_no" property="erbanNo" jdbcType="BIGINT" />
  7. <result column="feedback_desc" property="feedbackDesc" jdbcType="VARCHAR" />
  8. <result column="img_url" property="imgUrl" jdbcType="VARCHAR" />
  9. <result column="contact" property="contact" jdbcType="VARCHAR" />
  10. <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
  11. </resultMap>
  12. <select id="getFeedbackList" resultMap="BaseResultMap" >
  13. select fb.uid, u.erban_no, fb.feedback_desc, fb.img_url, fb.contact, fb.create_time
  14. from feedback fb
  15. INNER JOIN users u on fb.uid = u.uid
  16. where 1 = 1
  17. <if test="erbanNo!=null and erbanNo!=''">
  18. AND u.erban_no=#{erbanNo}
  19. </if>
  20. <if test="beginDate!=null and beginDate!=''">
  21. AND fb.create_time &gt;= #{beginDate}
  22. </if>
  23. <if test="endDate!=null and endDate!=''">
  24. AND fb.create_time &lt;= #{endDate}
  25. </if>
  26. ORDER BY fb.create_time desc
  27. </select>
  28. </mapper>