|
@@ -189,12 +189,15 @@ public class NoticeWebsitLogic {
|
|
|
for (String id : noticeIds) {
|
|
|
|
|
|
|
|
|
+
|
|
|
NoticeWebsit one = noticeWebsitService.getById(id);
|
|
|
if (one != null){
|
|
|
- one.setNum(noticeWebsitRecordService.lambdaQuery()
|
|
|
- .eq(NoticeWebsitRecord::getNoticeWebsitId,id)
|
|
|
- .eq(NoticeWebsitRecord::getReadFlag,IsYesNoEnum.YES.getKey()).count());
|
|
|
- one.updateById();
|
|
|
+
|
|
|
+ noticeWebsitService.lambdaUpdate()
|
|
|
+ .eq(NoticeWebsit::getNoticeWebsitId,one.getNoticeWebsitId())
|
|
|
+ .set(NoticeWebsit::getNum,noticeWebsitRecordService.lambdaQuery()
|
|
|
+ .eq(NoticeWebsitRecord::getNoticeWebsitId,id)
|
|
|
+ .eq(NoticeWebsitRecord::getReadFlag,IsYesNoEnum.YES.getKey()).count()).update();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -225,10 +228,11 @@ public class NoticeWebsitLogic {
|
|
|
websitRecord.updateById();
|
|
|
NoticeWebsit one = noticeWebsitService.getById(websitRecord.getNoticeWebsitId());
|
|
|
if (one != null){
|
|
|
- one.setNum(noticeWebsitRecordService.lambdaQuery()
|
|
|
- .eq(NoticeWebsitRecord::getNoticeWebsitId,websitRecord.getNoticeWebsitId())
|
|
|
- .eq(NoticeWebsitRecord::getReadFlag,IsYesNoEnum.YES.getKey()).count());
|
|
|
- one.updateById();
|
|
|
+ noticeWebsitService.lambdaUpdate()
|
|
|
+ .eq(NoticeWebsit::getNoticeWebsitId,one.getNoticeWebsitId())
|
|
|
+ .set(NoticeWebsit::getNum,noticeWebsitRecordService.lambdaQuery()
|
|
|
+ .eq(NoticeWebsitRecord::getNoticeWebsitId,id)
|
|
|
+ .eq(NoticeWebsitRecord::getReadFlag,IsYesNoEnum.YES.getKey()).count()).update();
|
|
|
}
|
|
|
|
|
|
|
|
@@ -242,6 +246,7 @@ public class NoticeWebsitLogic {
|
|
|
AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
noticeWebsitRecordService.lambdaUpdate()
|
|
|
.in(NoticeWebsitRecord::getId,id)
|
|
|
+ .eq(NoticeWebsitRecord::getReadFlag,IsYesNoEnum.NO.getKey())
|
|
|
.in(!CollectionUtils.isEmpty(adminUser.getAdminWebsitIds()),NoticeWebsitRecord::getAdminWebsitId, adminUser.getAdminWebsitIds())
|
|
|
.set(NoticeWebsitRecord::getReadFlag, IsYesNoEnum.YES.getKey())
|
|
|
.set(NoticeWebsitRecord::getReadTime, new Date())
|
|
@@ -252,10 +257,11 @@ public class NoticeWebsitLogic {
|
|
|
NoticeWebsitRecord noticeWebsitRecord = noticeWebsitRecordService.getById(idOne);
|
|
|
NoticeWebsit one = noticeWebsitService.getById(noticeWebsitRecord.getNoticeWebsitId());
|
|
|
if (one != null){
|
|
|
- one.setNum(noticeWebsitRecordService.lambdaQuery()
|
|
|
- .eq(NoticeWebsitRecord::getNoticeWebsitId,id)
|
|
|
- .eq(NoticeWebsitRecord::getReadFlag,IsYesNoEnum.YES.getKey()).count());
|
|
|
- one.updateById();
|
|
|
+ noticeWebsitService.lambdaUpdate()
|
|
|
+ .eq(NoticeWebsit::getNoticeWebsitId,one.getNoticeWebsitId())
|
|
|
+ .set(NoticeWebsit::getNum,noticeWebsitRecordService.lambdaQuery()
|
|
|
+ .eq(NoticeWebsitRecord::getNoticeWebsitId,id)
|
|
|
+ .eq(NoticeWebsitRecord::getReadFlag,IsYesNoEnum.YES.getKey()).count()).update();
|
|
|
}
|
|
|
}
|
|
|
}
|