通知中心接口修改

This commit is contained in:
张松
2025-04-07 10:19:31 +08:00
parent 7b67e1b0ef
commit df95923d4a

View File

@@ -64,7 +64,7 @@ public class SyncNoticeController {
* @return 消息记录数 * @return 消息记录数
*/ */
@PutMapping("/count") @PutMapping("/count")
public CzgResult<Long> count(@RequestParam Integer isRead) { public CzgResult<Long> count(@RequestParam(required = false) Integer isRead) {
QueryWrapper queryWrapper = new QueryWrapper().eq(SyncNotice::getShopId, StpKit.USER.getShopId()); QueryWrapper queryWrapper = new QueryWrapper().eq(SyncNotice::getShopId, StpKit.USER.getShopId());
queryWrapper.eq(SyncNotice::getIsRead, isRead); queryWrapper.eq(SyncNotice::getIsRead, isRead);
return CzgResult.success(syncNoticeService.count(queryWrapper)); return CzgResult.success(syncNoticeService.count(queryWrapper));