feat: 角色成员维护接口与用户清空角色修复

- 新增 /api/system/role-member 分页/添加/移除,@DS("server"),权限 sys:role:update,写操作记操作日志
- UserServiceImpl.updateUser 在 roles 非空判断下先删后插,空列表清空全部角色;updateUser/pageRel 切 server 库
- OperationRecordServiceImpl 加类级 @DS("server"),操作日志真正写入 gxtyzx_core
- OperationLogAspect 兼容无 User-Agent 的客户端,避免写日志 NPE 导致写操作失败
- RoleMemberIT 覆盖添加成员、移除最后一名成员、按角色分页、用户清空角色、403 与操作日志
This commit is contained in:
2026-10-30 19:59:41 +08:00
parent 029164c810
commit d44e91d6e6
13 changed files with 738 additions and 5 deletions
+7
View File
@@ -40,6 +40,13 @@
<scope>test</scope>
</dependency>
<!-- spring-security-test: MockMvc 直接注入登录态 -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<!-- spring-boot-web -->
<dependency>
<groupId>org.springframework.boot</groupId>