NoticesAcceptDao.xml 1008 B

12345678910111213141516171819202122232425
  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="platform.modules.sys.dao.NoticesAcceptDao">
  4. <select id="findNotifyDetailByPushType" resultType="platform.modules.sys.entity.NoticesAccept">
  5. SELECT
  6. company.company_name,
  7. notices_accept.read_statu
  8. FROM
  9. notices notice
  10. LEFT JOIN notices_accept notices_accept ON notice.id = notices_accept.notice_id
  11. LEFT JOIN y_company company ON notices_accept.user_id = company.id
  12. WHERE
  13. notice.recorde_id = #{id}
  14. AND notices_accept.user_type = #{usertype}
  15. <if test=" is_read != null ">
  16. AND notices_accept.read_statu = #{is_read}
  17. </if>
  18. <if test=" keyword != null and keyword != '' ">
  19. AND company.company_name LIKE CONCAT('%',#{keyword},'%')
  20. </if>
  21. <!-- GROUP BY notices_accept.user_id -->
  22. </select>
  23. </mapper>