|
@@ -6,7 +6,9 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
|
|
|
import com.persagy.adm.diagram.core.ContentParser;
|
|
|
import com.persagy.adm.diagram.core.model.base.*;
|
|
|
import com.persagy.adm.diagram.core.model.logic.*;
|
|
|
+import com.persagy.adm.diagram.dao.TemplateMapper;
|
|
|
import com.persagy.adm.diagram.entity.DiagramType;
|
|
|
+import com.persagy.adm.diagram.entity.TemplateEntity;
|
|
|
import com.persagy.adm.diagram.frame.EditRequest;
|
|
|
import com.persagy.adm.diagram.core.DataStrategy;
|
|
|
import com.persagy.adm.diagram.core.model.template.ContainerRefPoint;
|
|
@@ -111,6 +113,26 @@ public class TemplateManager {
|
|
|
return dataStrategy.deleteTemplate(id);
|
|
|
}
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private TemplateMapper templateMapper;
|
|
|
+ /**
|
|
|
+ * 编辑模板的基本信息
|
|
|
+ */
|
|
|
+ public boolean editTemplateInfo(String id, Map<String, String> infos) {
|
|
|
+ TemplateEntity entity = templateMapper.selectById(id);
|
|
|
+ if(entity != null){
|
|
|
+ if(infos.containsKey("name"))
|
|
|
+ entity.setName(infos.get("name"));
|
|
|
+ if(infos.containsKey("code"))
|
|
|
+ entity.setCode(infos.get("code"));
|
|
|
+ if(infos.containsKey("remark"))
|
|
|
+ entity.setRemark(infos.get("remark"));
|
|
|
+ templateMapper.updateById(entity);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 保存模板
|
|
|
*/
|