F2-6: candidateGroup URL 膨胀修复 + 角色缓存失效钩子
- flowable-service: 新增 POST /api/flow/tasks/todo 端点(TodoRequest body), 避免 ceshi 236 角色 × 36 字符拼 GET URL 超 8KB 限制 - FlowableClient.todo() 改用 POST body 传 candidateGroups, 新增 post() ParameterizedTypeReference 重载支持 List 返回类型 - AdminWriteController: 注入 RoleResolver,用户组成员增减调 evict(userId), 用户组角色增减/删除调 evictAll(),确保权限变更后缓存及时失效 - platform-metadata/pom.xml 加 platform-auth 依赖 - AdminWriteControllerTest 适配 RoleResolver mock 参数
This commit is contained in:
@@ -111,6 +111,17 @@ public class FlowController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* F2-6 JWT 瘦身:待办查询 POST 版本,candidateGroups 放 body 避免 URL 超 8KB。
|
||||
* 语义与 GET /tasks/todo 完全一致,gateway 优先调此端点。
|
||||
*/
|
||||
@PostMapping("/tasks/todo")
|
||||
@Operation(summary = "待办列表(POST body版)", description = "F2-6:candidateGroups 放 body,避免多角色用户 URL 超 8KB 限制;语义同 GET /tasks/todo")
|
||||
public List<TaskDto> todoPost(@RequestBody Requests.TodoRequest req) {
|
||||
if (req == null) req = new Requests.TodoRequest();
|
||||
return todo(req.assignee, req.candidateGroups, req.candidateUser, req.firstResult, req.maxResults);
|
||||
}
|
||||
|
||||
@GetMapping("/tasks/todo/count")
|
||||
@Operation(summary = "待办计数", description = "与 act_ru_task 直查对账用:按 assignee 计活动待办数")
|
||||
public long todoCount(@RequestParam(required = false) String assignee) {
|
||||
|
||||
@@ -27,4 +27,16 @@ public final class Requests {
|
||||
public static class DelegateRequest {
|
||||
public String delegateUserId;
|
||||
}
|
||||
|
||||
/**
|
||||
* F2-6 JWT 瘦身:待办查询 body(替代 GET candidateGroup 多值参数,
|
||||
* 避免多角色用户 URL 超 8KB Tomcat 默认限制)。
|
||||
*/
|
||||
public static class TodoRequest {
|
||||
public String assignee;
|
||||
public java.util.List<String> candidateGroups;
|
||||
public String candidateUser;
|
||||
public int firstResult = 0;
|
||||
public int maxResults = 50;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user