Notification.xml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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.caimei.modules.sys.dao.NotificationDao">
  4. <select id="notification" resultType="com.caimei.modules.sys.entity.Notification">
  5. SELECT * FROM `notification`
  6. <where>
  7. <if test="theme!=null and theme!=''">
  8. and theme LIKE CONCAT('%',#{theme},'%')
  9. </if>
  10. </where>
  11. ORDER BY newTime desc
  12. <choose>
  13. <when test="page !=null and page.orderBy != null and page.orderBy != ''">
  14. ORDER BY ${page.orderBy}
  15. </when>
  16. <otherwise>
  17. </otherwise>
  18. </choose>
  19. </select>
  20. <select id="notificationId" resultType="java.lang.String">
  21. SELECT shopContent
  22. FROM `notification`
  23. where id = #{id}
  24. </select>
  25. <update id="Upnotification">
  26. UPDATE notification SET saved=1
  27. <where>
  28. <if test="id!=null">
  29. and id=#{id}
  30. </if>
  31. </where>
  32. </update>
  33. <update id="hide">
  34. UPDATE notification
  35. SET hide=#{hide},
  36. saved=1
  37. where id = #{Id}
  38. </update>
  39. <update id="hides">
  40. UPDATE notification
  41. SET hide=0
  42. </update>
  43. </mapper>