Merge remote-tracking branch 'origin/master'

This commit is contained in:
Tankaikai 2025-04-08 09:32:47 +08:00
commit f6b4504132
2 changed files with 20 additions and 1 deletions

View File

@ -58,6 +58,25 @@ public class SyncNoticeController {
return CzgResult.success(syncNoticeService.read(StpKit.USER.getShopId(), syncNoticeReadDTO));
}
/**
* 清空已读
* @return 是否成功
*/
@DeleteMapping("/clear")
public CzgResult<Boolean> clear() {
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)));
}
/**
* 消息统计

View File

@ -48,7 +48,7 @@ public class SyncNoticeServiceImpl extends ServiceImpl<SyncNoticeMapper, SyncNot
break;
}
content = StrUtil.format("{}: {}({}), 请及时确认;", content, name, id);
content = StrUtil.format("{}: {}, 请及时确认;", content, name);
syncNotice.setContent(content);
save(syncNotice);
}