Merge pull request #4436 from dataease/pr@dev@fix_app-update

fix(应用): 修复应用更新名称缩略图未显示问题
This commit is contained in:
王嘉豪 2023-02-01 11:04:01 +08:00 committed by GitHub
commit debbc3a0aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ import java.util.List;
* Date: 2022/9/8
* Description:
*/
@Api(tags = "仪表板:应关系")
@Api(tags = "仪表板:应关系")
@ApiSupport(order = 170)
@RestController
@RequestMapping("appTemplate")

View File

@ -103,7 +103,7 @@ public class PanelAppTemplateService {
PanelAppTemplateWithBLOBs requestTemplate = new PanelAppTemplateWithBLOBs();
BeanUtils.copyBean(requestTemplate, request);
//Store static resource into the server
if (StringUtils.isNotEmpty(request.getSnapshot())) {
if (StringUtils.isNotEmpty(request.getSnapshot()) && request.getSnapshot().indexOf("static-resource") == -1) {
String snapshotName = "app-template-" + UUIDUtil.getUUIDAsString() + ".jpeg";
staticResourceService.saveSingleFileToServe(snapshotName, request.getSnapshot().replace("data:image/jpeg;base64,", ""));
requestTemplate.setSnapshot("/" + UPLOAD_URL_PREFIX + '/' + snapshotName);