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());
|
||||
panelTemplateMapper.deleteByExample(exampleDelete);
|
||||
}
|
||||
if ("template".equals(request.getNodeType())) {
|
||||
//Store static resource into the server
|
||||
staticResourceService.saveFilesToServe(request.getStaticResource());
|
||||
String snapshotName = "template-" + request.getId() + ".jpeg";
|
||||
staticResourceService.saveSingleFileToServe(snapshotName,request.getSnapshot().replace("data:image/jpeg;base64,","") );
|
||||
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);
|
||||
} else {
|
||||
String nameCheckResult = this.nameCheck(CommonConstants.OPT_TYPE.UPDATE, request.getName(), request.getPid(), request.getId());
|
||||
|
Loading…
Reference in New Issue
Block a user