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