feat(def): updateMeta 元数据原地编辑——已发布可改 name/appKey 不升版本(议题2)

- 独立于 save 的升版本路径:不碰 code/flow_guid/version/status/contentJson 结构
- contentJson 顶层 name 同步(ObjectNode 保序;消除行 name 与 JSON name 脏窗口,拍板 D4)
- appKey 校验同 save 口径(显式传入须 flw_app 启用集合;可置空)
- 单测 5 例(三不变断言/白名单/补写/跨校)+ E2E 14/14(含升版本路径回归与 oapi 摘要)
This commit is contained in:
chenxing
2026-10-10 19:23:44 +08:00
parent d6b7a68ec3
commit 4293c9628a
3 changed files with 178 additions and 0 deletions
@@ -104,6 +104,18 @@ public class FlowAdminController {
(String) body.get("appKey"));
}
/**
* 元数据原地编辑(2026-10-10 议题2):只改 name/appKey 不升版本(version/flowGuid/status/contentJson
* 结构均不动,仅同步 contentJson 顶层 name);已发布亦可。结构改动请走编辑器升版本。
*/
@PostMapping("/def/updateMeta")
public FlwDef defUpdateMeta(BoaUser user, @RequestBody Map<String, Object> body) {
Long schId = adminGuard.requireAdmin(user, null);
return defAdminService.updateMeta(schId,
body.get("id") == null ? null : Long.valueOf(String.valueOf(body.get("id"))),
(String) body.get("name"), (String) body.get("appKey"));
}
@PostMapping("/def/publish/{id}")
public FlwDef defPublish(BoaUser user, @PathVariable("id") Long id) {
return defAdminService.publish(adminGuard.requireAdmin(user, null), id);