|
|
@@ -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)));
|