feat: 公告支持设置通知范围

This commit is contained in:
kiki1373639299
2024-10-23 16:16:14 +08:00
committed by Charles_7c
parent e01df09127
commit 29202aea30
12 changed files with 114 additions and 10 deletions

View File

@@ -43,10 +43,12 @@ import top.continew.starter.core.util.validate.ValidationUtils;
import top.continew.starter.extension.crud.annotation.CrudRequestMapping;
import top.continew.starter.extension.crud.controller.BaseController;
import top.continew.starter.extension.crud.enums.Api;
import top.continew.starter.extension.crud.model.query.SortQuery;
import top.continew.starter.extension.crud.model.resp.BaseIdResp;
import top.continew.starter.extension.crud.util.ValidateGroup;
import java.io.IOException;
import java.util.List;
/**
* 用户管理 API
@@ -63,6 +65,11 @@ public class UserController extends BaseController<UserService, UserResp, UserDe
private final UserService userService;
@Override
public List<UserResp> list(UserQuery query, SortQuery sortQuery) {
return super.list(query, sortQuery);
}
@Override
public BaseIdResp<Long> add(@Validated(ValidateGroup.Crud.Add.class) @RequestBody UserReq req) {
String rawPassword = ExceptionUtils.exToNull(() -> SecureUtils.decryptByRsaPrivateKey(req.getPassword()));

View File

@@ -5,6 +5,8 @@ databaseChangeLog:
file: db/changelog/mysql/continew-admin_column.sql
- include:
file: db/changelog/mysql/continew-admin_data.sql
- include:
file: db/changelog/mysql/continew-admin_change_v3.4.0.sql
# PostgreSQL
# - include:
# file: db/changelog/postgresql/continew-admin_table.sql

View File

@@ -0,0 +1,6 @@
-- 消息通知表 新增通知范围 和 通知用户两个字段
START TRANSACTION;
ALTER TABLE sys_notice
ADD COLUMN notice_scope INT NOT NULL COMMENT '通知范围' AFTER terminate_time,
ADD COLUMN notice_users JSON DEFAULT NULL COMMENT '通知用户' AFTER notice_scope;
COMMIT;