fanxp преди 1 година
родител
ревизия
9fb1d28ba5
променени са 1 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. 6 6
      src/main/java/com/xjrsoft/module/oa/controller/NewsController.java

+ 6 - 6
src/main/java/com/xjrsoft/module/oa/controller/NewsController.java

@@ -328,7 +328,7 @@ public class NewsController {
                         .eq(News::getStatus, 2)
                         .gt(News::getSendEndDate, LocalDateTime.now())
                         .eq(News::getWfStatus, 1)
-                        .notIn(News::getId, "select distinct news_id from xjr_oa_news_relation where user_id = " + StpUtil.getLoginIdAsLong()));
+                        .notInSql(News::getId, "select distinct news_id from xjr_oa_news_relation where user_id = " + StpUtil.getLoginIdAsLong()));
 
                 newsCountTypeVo.setTypeId(typeId);
                 newsCountTypeVo.setTotal(notReadCount);
@@ -338,7 +338,7 @@ public class NewsController {
                         .eq(News::getStatus, 2)
                         .gt(News::getSendEndDate, LocalDateTime.now())
                         .eq(News::getWfStatus, 1)
-                        .notIn(News::getId, "select distinct news_id from xjr_oa_news_relation where user_id = " + StpUtil.getLoginIdAsLong())
+                        .notInSql(News::getId, "select distinct news_id from xjr_oa_news_relation where user_id = " + StpUtil.getLoginIdAsLong())
                         .orderByDesc(News::getReleaseTime)
                         .last("limit 1"));
             }
@@ -348,7 +348,7 @@ public class NewsController {
                 Long notReadCount = newsService.count(Wrappers.<News>query().lambda()
                         .eq(News::getTypeId, typeId)
                         .eq(News::getStatus, 2)
-                        .notIn(News::getId, "select distinct news_id from xjr_oa_news_relation where read_mark = 1 and user_id = " + StpUtil.getLoginIdAsLong())
+                        .notInSql(News::getId, "select distinct news_id from xjr_oa_news_relation where read_mark = 1 and user_id = " + StpUtil.getLoginIdAsLong())
                         .and(wp -> wp.gt(News::getSendEndDate, LocalDateTime.now())
                                 .or()
                                 .isNull(News::getSendEndDate)));
@@ -356,7 +356,7 @@ public class NewsController {
                 news = newsService.getOne(Wrappers.<News>query().lambda()
                         .eq(News::getTypeId, typeId)
                         .eq(News::getStatus, 2)
-                        .notIn(News::getId, "select distinct news_id from xjr_oa_news_relation where read_mark = 1 and user_id = " + StpUtil.getLoginIdAsLong())
+                        .notInSql(News::getId, "select distinct news_id from xjr_oa_news_relation where read_mark = 1 and user_id = " + StpUtil.getLoginIdAsLong())
                         .and(wp -> wp.gt(News::getSendEndDate, LocalDateTime.now())
                                 .or()
                                 .isNull(News::getSendEndDate))
@@ -389,12 +389,12 @@ public class NewsController {
                 .eq(News::getStatus, 2)
                 .gt(News::getSendEndDate, LocalDateTime.now())
                 .eq(News::getWfStatus, 1)
-                .notIn(News::getId, "select distinct news_id from xjr_oa_news_relation where user_id = " + StpUtil.getLoginIdAsLong()));
+                .notInSql(News::getId, "select distinct news_id from xjr_oa_news_relation where user_id = " + StpUtil.getLoginIdAsLong()));
 
         Long notReadCountProclamation = newsService.count(Wrappers.<News>query().lambda()
                 .eq(News::getTypeId, 2)
                 .eq(News::getStatus, 2)
-                .notIn(News::getId, "select distinct news_id from xjr_oa_news_relation where read_mark = 1 and user_id = " + StpUtil.getLoginIdAsLong())
+                .notInSql(News::getId, "select distinct news_id from xjr_oa_news_relation where read_mark = 1 and user_id = " + StpUtil.getLoginIdAsLong())
                 .and(wp -> wp.gt(News::getSendEndDate, LocalDateTime.now())
                         .or()
                         .isNull(News::getSendEndDate)));