فهرست منبع

新闻公告调整

dzx 1 سال پیش
والد
کامیت
c1dddac3e3

+ 2 - 1
src/main/java/com/xjrsoft/module/oa/service/impl/NewsServiceImpl.java

@@ -509,7 +509,8 @@ public class NewsServiceImpl extends MPJBaseServiceImpl<NewsMapper, News> implem
                 newsRelationMapper.insertPersonl(xjrNews.getId(), userIdList);
             }
 
-        }else if (xjrNews.getSendRange() == 2) {
+        }
+        else if (xjrNews.getSendRange() == 2) {
             newsRelationMapper.insertAllTeaStaff(xjrNews.getId());
         }else if (xjrNews.getSendRange() == 1) {
             newsRelationMapper.insertClassUser(xjrNews.getId(), null);

+ 5 - 18
src/main/resources/mapper/oa/NewsMapper.xml

@@ -31,22 +31,12 @@
 
     <select id="receiptBox" parameterType="com.xjrsoft.module.oa.dto.NewsPageDto"
             resultType="com.xjrsoft.module.oa.vo.NewsPageVo">
-        select
-        t.*,t2.name as create_user_name
-        <if test="dto.loginId != null">
-            ,t3.read_mark
-        </if>
-        from xjr_oa_news t
+        select t.*,t2.name as create_user_name from xjr_oa_news t
         left join xjr_user t2 on t.create_user_id = t2.id
-        <if test="dto.loginId != null">
-            left join xjr_oa_news_relation t3 on t.id = t3.news_id and t3.user_id = #{dto.loginId}
-        </if>
-        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 (t.send_range = 1 or t.id in (select news_id from xjr_oa_news_relation t1 where user_id = #{dto.loginId}))
-        </if>
+        left join xjr_oa_news_relation t3 on t.id = t3.news_id
+        where t.delete_mark = 0
+        and (t.send_end_date > now() or t.send_end_date is null)
+        and t.status = 2 and t3.user_id = #{dto.loginId}
         <if test="dto.type != null and dto.type == 1">
             and t.wf_status = 1
         </if>
@@ -60,9 +50,6 @@
             and (t.full_head LIKE CONCAT('%',#{dto.keyword},'%')
                 or t.news_content LIKE CONCAT('%',#{dto.keyword},'%'))
         </if>
-        <if test="dto.loginId != null and dto.loginRoleId != null and dto.loginRoleId == 4">
-            and t3.user_id = #{dto.loginId}
-        </if>
         <if test="dto.loginId != null and dto.readMark != null">
             and t3.read_mark =  #{dto.readMark}
         </if>