feat:
1. notice module
This commit is contained in:
@@ -106,11 +106,13 @@ public class CommonUserNoticeServiceImpl extends BaseServiceImpl<CommonUserNotic
|
||||
public CommonUserNoticeDetailApiVO userNoticeDetail(Long id) {
|
||||
CommonUserNoticeEntity notice = getById(id);
|
||||
Assert.notNull(notice, "无效消息");
|
||||
if (notice.getNoticeType() != NoticeType.GLOBAL.getCode() && notice.getNoticeType() != NoticeType.APP_SYSTEM.getCode() && notice.getNoticeType() != NoticeType.MARKET_SYSTEM.getCode()) {
|
||||
Assert.isTrue(Objects.equals(notice.getUserId(), AuthUtil.getUserId()), "无效消息");
|
||||
if (notice.getHasRead() == 0) {
|
||||
notice.setHasRead(1);
|
||||
updateById(notice);
|
||||
}
|
||||
}
|
||||
return AppCommonConvert.INSTANCE.convertNoticeDetailVO(notice);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user