forked from github/dataease
fix(模板管理): 模板管理不能创建分类问题
This commit is contained in:
parent
7b9a7a2aba
commit
557b2f306f
@ -80,11 +80,14 @@ public class PanelTemplateService {
|
|||||||
exampleDelete.createCriteria().andPidEqualTo(request.getPid()).andNameEqualTo(request.getName());
|
exampleDelete.createCriteria().andPidEqualTo(request.getPid()).andNameEqualTo(request.getName());
|
||||||
panelTemplateMapper.deleteByExample(exampleDelete);
|
panelTemplateMapper.deleteByExample(exampleDelete);
|
||||||
}
|
}
|
||||||
//Store static resource into the server
|
if ("template".equals(request.getNodeType())) {
|
||||||
staticResourceService.saveFilesToServe(request.getStaticResource());
|
//Store static resource into the server
|
||||||
String snapshotName = "template-" + request.getId() + ".jpeg";
|
staticResourceService.saveFilesToServe(request.getStaticResource());
|
||||||
staticResourceService.saveSingleFileToServe(snapshotName,request.getSnapshot().replace("data:image/jpeg;base64,","") );
|
String snapshotName = "template-" + request.getId() + ".jpeg";
|
||||||
request.setSnapshot("/"+UPLOAD_URL_PREFIX+'/'+snapshotName);
|
staticResourceService.saveSingleFileToServe(snapshotName, request.getSnapshot().replace("data:image/jpeg;base64,", ""));
|
||||||
|
request.setSnapshot("/" + UPLOAD_URL_PREFIX + '/' + snapshotName);
|
||||||
|
}
|
||||||
|
|
||||||
panelTemplateMapper.insert(request);
|
panelTemplateMapper.insert(request);
|
||||||
} else {
|
} else {
|
||||||
String nameCheckResult = this.nameCheck(CommonConstants.OPT_TYPE.UPDATE, request.getName(), request.getPid(), request.getId());
|
String nameCheckResult = this.nameCheck(CommonConstants.OPT_TYPE.UPDATE, request.getName(), request.getPid(), request.getId());
|
||||||
|
Loading…
Reference in New Issue
Block a user