|
@@ -198,4 +198,25 @@ public class NoticeWebsitLogic {
|
|
|
.update();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ public void readOne(List<String> id) {
|
|
|
+
|
|
|
+ AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
+ noticeWebsitRecordService.lambdaUpdate()
|
|
|
+ .in(NoticeWebsitRecord::getId,id)
|
|
|
+ .in(!CollectionUtils.isEmpty(adminUser.getAdminWebsitIds()),NoticeWebsitRecord::getAdminWebsitId, adminUser.getAdminWebsitIds())
|
|
|
+ .set(NoticeWebsitRecord::getReadFlag, IsYesNoEnum.YES.getKey())
|
|
|
+ .set(NoticeWebsitRecord::getReadTime, new Date())
|
|
|
+ .update();
|
|
|
+
|
|
|
+ for (String idOne : id) {
|
|
|
+
|
|
|
+ NoticeWebsitRecord noticeWebsitRecord = noticeWebsitRecordService.getById(idOne);
|
|
|
+ NoticeWebsit one = noticeWebsitService.getById(noticeWebsitRecord.getNoticeWebsitId());
|
|
|
+ if (one != null){
|
|
|
+ one.setNum(one.getNum()+1);
|
|
|
+ one.updateById();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|