mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
增加系统通知接口
This commit is contained in:
@@ -25,5 +25,5 @@ public class CreateNoticeDto extends CommonDto {
|
||||
private List<String> receivers;
|
||||
|
||||
@Comment("是否全体")
|
||||
private Boolean all;
|
||||
private Boolean allUser;
|
||||
}
|
||||
|
||||
@@ -30,5 +30,5 @@ public class NoticeDto extends CommonDto {
|
||||
|
||||
|
||||
@Comment("是否全体")
|
||||
private Boolean all;
|
||||
private Boolean allUser;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class NoticeEntity extends CommonEntity {
|
||||
|
||||
|
||||
@Comment("是否全体")
|
||||
private Boolean all;
|
||||
private Boolean allUser;
|
||||
|
||||
|
||||
@OneToMany(cascade = CascadeType.REMOVE)
|
||||
|
||||
@@ -50,9 +50,9 @@ public class NoticeService extends BaseService<NoticeEntity, NoticeRepository> {
|
||||
UserEntity sender = this.userService.get(Ctx.getUserId());
|
||||
|
||||
List<UserEntity> users = new ArrayList<>();
|
||||
if (BooleanUtils.isTrue(request.getAll())) {
|
||||
if (BooleanUtils.isTrue(request.getAllUser())) {
|
||||
|
||||
users = userService.findAll();
|
||||
users = userService.findAll().stream().filter(x ->! x.getId().equals(sender.getId())).collect(Collectors.toList());
|
||||
}else if (request.getReceivers() != null) {
|
||||
|
||||
users = userService.findAllByIds(request.getReceivers());
|
||||
|
||||
Reference in New Issue
Block a user