fanxp 1 年之前
父節點
當前提交
40e1410480
共有 2 個文件被更改,包括 3 次插入4 次删除
  1. 1 1
      src/main/resources/application.yml
  2. 2 3
      src/main/resources/mapper/oa/NewsMapper.xml

+ 1 - 1
src/main/resources/application.yml

@@ -5,7 +5,7 @@ server:
 spring:
   # 环境 dev|test|prod
   profiles:
-    active: dev
+    active: prod
   # jackson时间格式化
   jackson:
     time-zone: GMT+8

+ 2 - 3
src/main/resources/mapper/oa/NewsMapper.xml

@@ -30,12 +30,11 @@
         select
         t.*
         from xjr_oa_news t
-        left join xjr_oa_news_relation t1 on t1.news_id = t.id
         where t.delete_mark = 0 and
         (t.send_end_date > now() or t.send_end_date is null)
           and t.status = 2
-        <if test="dto.type != null and dto.type == 2 and dto.loginId != null and dto.loginId > 0">
-            and (t1.user_id = #{dto.loginId} or t.send_range = 1)
+        <if test="dto.type != null and dto.type == 2 and dto.loginId != null">
+            and (t.send_range = 1 or t.id in (select news_id from xjr_oa_news_relation t1 where user_id = #{dto.loginId}))
         </if>
         <if test="dto.type != null and dto.type == 1">
             and t.wf_status = 1