2 Commits be5de96343 ... 582f5cc2ed

Author SHA1 Message Date
  liyang 582f5cc2ed Merge remote-tracking branch 'origin/develop' into develop 3 years ago
  liyang c3b9eac725 feat(adm-diagram): 新增状态默认值 3 years ago

+ 2 - 3
adm-business/adm-diagram/src/main/java/com/persagy/adm/diagram/controller/DiagramController.java

@@ -1,6 +1,5 @@
 package com.persagy.adm.diagram.controller;
 
-import cn.hutool.json.JSONUtil;
 import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.persagy.adm.diagram.core.ContentParser;
 import com.persagy.adm.diagram.core.DataStrategy;
@@ -227,7 +226,7 @@ public class DiagramController {
      */
     @ApiOperation("系统图状态变更")
     @PostMapping("/update/state")
-    public CommonResult<Boolean> updateState(@RequestBody Map<String,String> params) {
-        return ResultHelper.single(dataStrategy.updateState(params.get("state"),params.get("id")));
+    public CommonResult<Boolean> updateState(@RequestBody Map<String, String> params) {
+        return ResultHelper.single(dataStrategy.updateState(params.get("state"), params.get("id")));
     }
 }

+ 1 - 0
adm-business/adm-diagram/src/main/java/com/persagy/adm/diagram/core/impl/DataStrategyImpl.java

@@ -338,6 +338,7 @@ public class DataStrategyImpl implements DataStrategy {
             }
         }
         diagram.setId(IdUtil.simpleUUID());
+        diagram.setExtraProp("state","Draft");
         diagramMapper.saveDiagram(modelAdapter.toDiagramEntity(diagram));
         return diagram;
     }