mirror of
https://gitee.com/jamen/slife.git
synced 2026-11-03 07:43:38 +00:00
更换启动图标和修改 activiti的rest返回为字符串
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
package com.slife.editor.controller;
|
||||
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import com.slife.base.entity.ReturnDTO;
|
||||
import com.slife.editor.service.EditorService;
|
||||
import com.slife.enums.HttpCodeEnum;
|
||||
import com.slife.exception.SlifeException;
|
||||
import com.slife.util.ReturnDTOUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -24,20 +26,20 @@ public class EditorController {
|
||||
|
||||
@ApiOperation(value = "获取设计器页面的json", notes = "获取设计器页面的json")
|
||||
@GetMapping("/editor/stencilset")
|
||||
public String getStencilset() {
|
||||
return editorService.getStencilset();
|
||||
public Object getStencilset() {
|
||||
return editorService.getStencilset();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据modelId获取model", notes = "根据modelId获取model")
|
||||
@GetMapping(value = "/model/{modelId}/json")
|
||||
public ObjectNode getEditorJson(@PathVariable String modelId) {
|
||||
public ObjectNode getEditorJson(@PathVariable(value ="modelId" ) String modelId) {
|
||||
Optional.ofNullable(modelId).orElseThrow(() -> new SlifeException(HttpCodeEnum.INVALID_REQUEST));
|
||||
return editorService.getEditorJson(modelId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "保存model信息", notes = "保存model信息")
|
||||
@PutMapping("/model/{modelId}/save")
|
||||
public void saveModel(@PathVariable String modelId, String name, String description,
|
||||
public void saveModel(@PathVariable(value ="modelId" ) String modelId, String name, String description,
|
||||
String json_xml, String svg_xml) {
|
||||
Optional.ofNullable(modelId).orElseThrow(() -> new SlifeException(HttpCodeEnum.INVALID_REQUEST));
|
||||
editorService.saveModel(modelId, name, description, json_xml, svg_xml);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.slife.editor.service;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import org.activiti.engine.ActivitiException;
|
||||
@@ -32,10 +33,11 @@ public class EditorService {
|
||||
@Autowired
|
||||
private ObjectMapper objectMapper;
|
||||
|
||||
public String getStencilset() {
|
||||
public Object getStencilset() {
|
||||
InputStream stencilsetStream = this.getClass().getClassLoader().getResourceAsStream("stencilset.json");
|
||||
try {
|
||||
return IOUtils.toString(stencilsetStream, "utf-8");
|
||||
String s= IOUtils.toString(stencilsetStream, "utf-8");
|
||||
return JSON.parse(s);
|
||||
} catch (Exception e) {
|
||||
throw new ActivitiException("Error while loading stencil set", e);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
SSSSSSSSSSSSSSS LLLLLLLLLLL iiii ffffffffffffffff
|
||||
SS:::::::::::::::SL:::::::::L i::::i f::::::::::::::::f
|
||||
S:::::SSSSSS::::::SL:::::::::L iiii f::::::::::::::::::f
|
||||
S:::::S SSSSSSSLL:::::::LL f::::::fffffff:::::f
|
||||
S:::::S L:::::L iiiiiii f:::::f ffffffeeeeeeeeeeee
|
||||
S:::::S L:::::L i:::::i f:::::f ee::::::::::::ee
|
||||
S::::SSSS L:::::L i::::i f:::::::ffffff e::::::eeeee:::::ee
|
||||
SS::::::SSSSS L:::::L i::::i f::::::::::::f e::::::e e:::::e
|
||||
SSS::::::::SS L:::::L i::::i f::::::::::::f e:::::::eeeee::::::e
|
||||
SSSSSS::::S L:::::L i::::i f:::::::ffffff e:::::::::::::::::e
|
||||
S:::::S L:::::L i::::i f:::::f e::::::eeeeeeeeeee
|
||||
S:::::S L:::::L LLLLLL i::::i f:::::f e:::::::e
|
||||
SSSSSSS S:::::SLL:::::::LLLLLLLLL:::::Li::::::if:::::::f e::::::::e
|
||||
S::::::SSSSSS:::::SL::::::::::::::::::::::Li::::::if:::::::f e::::::::eeeeeeee
|
||||
S:::::::::::::::SS L::::::::::::::::::::::Li::::::if:::::::f ee:::::::::::::e
|
||||
SSSSSSSSSSSSSSS LLLLLLLLLLLLLLLLLLLLLLLLiiiiiiiifffffffff eeeeeeeeeeeeee
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user