Browse Source

优化通知获取列表

tags/正式3.13.0
王宁 1 year ago
parent
commit
222b7dd288
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      sapi/src/main/resources/mapper/notice/NoticeMapper.xml

+ 2
- 2
sapi/src/main/resources/mapper/notice/NoticeMapper.xml View File

95
         from t_notice n left join t_user u on n.createid=u.userid
95
         from t_notice n left join t_user u on n.createid=u.userid
96
         left join t_notice_class nc on n.noticeid = nc.noticeid
96
         left join t_notice_class nc on n.noticeid = nc.noticeid
97
         left join t_class_student cs on nc.classid=cs.classid
97
         left join t_class_student cs on nc.classid=cs.classid
98
-        where cs.studentid=#{notice.createid} or (n.noticetype=3 and nc.classid=#{notice.createid})
98
+        where ((cs.studentid=#{notice.createid} and n.noticetype=1) or (n.noticetype=3 and nc.classid=#{notice.createid}))
99
         <if test="notice.createtime!=null and notice.createtime!=0">
99
         <if test="notice.createtime!=null and notice.createtime!=0">
100
             and n.createtime>=#{notice.createtime}
100
             and n.createtime>=#{notice.createtime}
101
         </if>
101
         </if>
109
         from t_notice n left join t_user u on n.createid=u.userid
109
         from t_notice n left join t_user u on n.createid=u.userid
110
         left join t_notice_class nc on n.noticeid = nc.noticeid
110
         left join t_notice_class nc on n.noticeid = nc.noticeid
111
         left join t_class_student cs on nc.classid=cs.classid
111
         left join t_class_student cs on nc.classid=cs.classid
112
-        where cs.studentid=#{notice.createid} or (n.noticetype=3 and nc.classid=#{notice.createid})
112
+        where ((cs.studentid=#{notice.createid} and n.noticetype=1) or (n.noticetype=3 and nc.classid=#{notice.createid}))
113
         <if test="notice.noticetitle!=null and notice.noticetitle!=''">
113
         <if test="notice.noticetitle!=null and notice.noticetitle!=''">
114
             and (n.noticetitle like concat('%', #{notice.noticetitle}, '%')
114
             and (n.noticetitle like concat('%', #{notice.noticetitle}, '%')
115
             or n.noticetxt like concat('%', #{notice.noticetitle}, '%'))
115
             or n.noticetxt like concat('%', #{notice.noticetitle}, '%'))

Loading…
Cancel
Save