瀏覽代碼

优化通知获取列表

tags/正式3.13.0
王宁 1 年之前
父節點
當前提交
222b7dd288
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. 2
    2
      sapi/src/main/resources/mapper/notice/NoticeMapper.xml

+ 2
- 2
sapi/src/main/resources/mapper/notice/NoticeMapper.xml 查看文件

@@ -95,7 +95,7 @@
95 95
         from t_notice n left join t_user u on n.createid=u.userid
96 96
         left join t_notice_class nc on n.noticeid = nc.noticeid
97 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 99
         <if test="notice.createtime!=null and notice.createtime!=0">
100 100
             and n.createtime>=#{notice.createtime}
101 101
         </if>
@@ -109,7 +109,7 @@
109 109
         from t_notice n left join t_user u on n.createid=u.userid
110 110
         left join t_notice_class nc on n.noticeid = nc.noticeid
111 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 113
         <if test="notice.noticetitle!=null and notice.noticetitle!=''">
114 114
             and (n.noticetitle like concat('%', #{notice.noticetitle}, '%')
115 115
             or n.noticetxt like concat('%', #{notice.noticetitle}, '%'))

Loading…
取消
儲存