feat(app): 应用设置·应用管理——flw_app 白名单 + 学校池同步 + defSave 归属应用校验
- flw_app(sch,app_key uk):学校池(UserBase list-by-school,学校组单点已开通、clientType=null 不过滤端) diff 同步——新增即 enabled=1、改名静默刷新、池外保留;UserBase 不可达降级本地行 - /admin/app/list(触发同步)/ /admin/app/enable;defSave 显式 appKey 须 ∈ 启用集合(不传不拦,升版本继承不受影响) - SQL 备案:flw_app 建表 + UserBase 菜单 107 新增/104 下线(人工执行) - 单测 +8;E2E 13/13(local-debug/four-topics-c-e2e.py) - 关联 SDK 修复:BoaApp.createTime @JsonFormat 对齐 UserBase 时间契约(BasePlatform 单独 commit,Nexus -73)
This commit is contained in:
@@ -50,6 +50,7 @@ public class FlowAdminController {
|
||||
private final FlowDiagramService diagramService;
|
||||
private final com.yunhai.flowcenter.service.DiagramImageService imageService;
|
||||
private final com.fasterxml.jackson.databind.ObjectMapper objectMapper;
|
||||
private final com.yunhai.flowcenter.service.FlowAppAdminService appAdminService;
|
||||
|
||||
// ==================== 流程定义 ====================
|
||||
|
||||
@@ -66,6 +67,27 @@ public class FlowAdminController {
|
||||
return defAdminService.distinctAppKeys(adminGuard.requireAdmin(user, null));
|
||||
}
|
||||
|
||||
// ==================== 应用设置(2026-10-10 四议题) ====================
|
||||
|
||||
/**
|
||||
* 应用管理列表:本校"可对接流程"白名单(flw_app)。附带一次学校池静默同步
|
||||
* (UserBase list-by-school;不可达降级本地行)。开通过程在 UserBase 管理端做。
|
||||
*/
|
||||
@GetMapping("/app/list")
|
||||
public List<com.yunhai.flowcenter.entity.FlwApp> appList(BoaUser user) {
|
||||
return appAdminService.list(adminGuard.requireAdmin(user, null));
|
||||
}
|
||||
|
||||
/** 开关某应用是否对接流程(停用后 defSave 归属应用校验拦截新引用) */
|
||||
@PostMapping("/app/enable")
|
||||
public void appEnable(BoaUser user,
|
||||
@org.springframework.web.bind.annotation.RequestBody Map<String, Object> body) {
|
||||
Long schId = adminGuard.requireAdmin(user, null);
|
||||
appAdminService.enable(schId,
|
||||
body.get("id") == null ? null : Long.valueOf(String.valueOf(body.get("id"))),
|
||||
Boolean.parseBoolean(String.valueOf(body.get("enabled"))));
|
||||
}
|
||||
|
||||
@GetMapping("/def/get")
|
||||
public FlwDef defGet(BoaUser user, @RequestParam("id") Long id) {
|
||||
return defAdminService.get(adminGuard.requireAdmin(user, null), id);
|
||||
|
||||
Reference in New Issue
Block a user