通知中心调整

This commit is contained in:
张松 2025-04-08 09:26:42 +08:00
parent 0253aaeaed
commit 1ebd686a22
1 changed files with 11 additions and 1 deletions

View File

@ -62,11 +62,21 @@ public class SyncNoticeController {
* 清空已读 * 清空已读
* @return 是否成功 * @return 是否成功
*/ */
@DeleteMapping @DeleteMapping("/clear")
public CzgResult<Boolean> clear() { public CzgResult<Boolean> clear() {
return CzgResult.success(syncNoticeService.remove(new QueryWrapper().eq(SyncNotice::getShopId, StpKit.USER.getShopId()).eq(SyncNotice::getIsRead, 1))); return CzgResult.success(syncNoticeService.remove(new QueryWrapper().eq(SyncNotice::getShopId, StpKit.USER.getShopId()).eq(SyncNotice::getIsRead, 1)));
} }
/**
* 删除
* @param id id
* @return 是否成功
*/
@DeleteMapping
public CzgResult<Boolean> delete(@RequestParam Long id) {
return CzgResult.success(syncNoticeService.remove(new QueryWrapper().eq(SyncNotice::getShopId, StpKit.USER.getShopId()).eq(SyncNotice::getId, id)));
}
/** /**
* 消息统计 * 消息统计