Spring Boot 流程引擎服务:流程定义/实例/任务、审批人解析、 回调分发、oapi 接口及单元测试。 保留远程 .gitea/workflows/build.yml 与 docker/Dockerfile, 新增 .gitignore 排除 target/ 构建产物。
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
package com.yunhai.flowcenter.controller.api;
|
||||
|
||||
import com.yunhai.platform.utils.model.BoaUser;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 前端壳基础端点(对齐 UserBase BaseController 的 /api/base/* 形态):
|
||||
* GetUserInfo 返回当前登录人;GetUserMod 返回本地路由菜单——flow-center 是独立登录态应用,
|
||||
* 菜单不走 UserBase app_module 下发(概览 §9.4),modId 为本应用内部约定。
|
||||
*/
|
||||
@RestController
|
||||
public class FlowBaseController {
|
||||
|
||||
/** 左侧菜单(本地路由,顺序即展示顺序) */
|
||||
private static final String[][] MENUS = {
|
||||
{"100", "工作台", "/workbench"},
|
||||
{"101", "我的办件", "/my"},
|
||||
{"102", "办件记录", "/admin/instances"},
|
||||
{"103", "流程定义", "/admin/defs"},
|
||||
{"104", "办理人映射", "/admin/maps"},
|
||||
{"105", "回调管理", "/admin/callbacks"},
|
||||
};
|
||||
|
||||
@GetMapping("/api/base/GetUserInfo")
|
||||
public BoaUser getUserInfo(BoaUser authUserWithDept) {
|
||||
return authUserWithDept;
|
||||
}
|
||||
|
||||
@GetMapping("/api/base/GetUserMod")
|
||||
public List<Map<String, Object>> getUserMod() {
|
||||
List<Map<String, Object>> modList = new ArrayList<>();
|
||||
for (String[] m : MENUS) {
|
||||
Map<String, Object> item = new HashMap<>();
|
||||
item.put("id", Integer.valueOf(m[0]));
|
||||
item.put("modId", Integer.valueOf(m[0]));
|
||||
item.put("name", m[1]);
|
||||
item.put("page", m[2]);
|
||||
item.put("children", new ArrayList<>());
|
||||
modList.add(item);
|
||||
}
|
||||
return modList;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user