XiaoyuanNoticeMapper.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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="org.dromara.system.mapper.notice.XiaoyuanNoticeMapper">
  6. <resultMap type="org.dromara.system.domain.notice.vo.XiaoyuanNoticeVo" id="XiaoyuanNoticeResult">
  7. <result property="noticeId" column="notice_id"/>
  8. <result property="image" column="image"/>
  9. <result property="noticeTitle" column="notice_title"/>
  10. <result property="noticeType" column="notice_type"/>
  11. <result property="noticeContent" column="notice_content"/>
  12. <result property="status" column="status"/>
  13. <result property="type" column="type"/>
  14. <result property="classIdKeJian" column="class_id_kejian"/>
  15. <result property="classIdBuKeJian" column="class_id_bukejian"/>
  16. <result property="senderId" column="sender_id"/>
  17. <result property="senderName" column="sender_name"/>
  18. <result property="senderDept" column="sender_dept"/>
  19. <result property="remark" column="remark"/>
  20. <result property="avatar" column="avatar"/>
  21. <result property="schoolName" column="school_name"/>
  22. <result property="comment" column="comment"/>
  23. <result property="prised" column="prised"/>
  24. <result property="collect" column="collect"/>
  25. </resultMap>
  26. <sql id="selectXiaoyuanNoticeVo">
  27. select notice_id, image, notice_title, notice_type, notice_content, status, type,school_name,avatar, sender_id, sender_name, sender_dept, create_by, create_time, update_by, update_time, remark,collect,prised,comment from xiaoyuan_notice
  28. </sql>
  29. <select id="selectXiaoyuanNoticeByMyCollect"
  30. resultMap="XiaoyuanNoticeResult">
  31. <include refid="selectXiaoyuanNoticeVo"/>
  32. ${ew.getCustomSqlSegment}
  33. </select>
  34. <select id="selectXiaoyuanNoticeMyList" resultMap="XiaoyuanNoticeResult">
  35. <include refid="selectXiaoyuanNoticeVo"/>
  36. where sender_id = #{senderId} order by create_time DESC
  37. </select>
  38. </mapper>