Helius
2022-08-09 b1ac996b8398c1378c1739f1ceb1237d289979fb
fix:template edit modify
1 files modified
3 ■■■■ changed files
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/CmsTemplateServiceImpl.java 3 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/CmsTemplateServiceImpl.java
@@ -220,12 +220,11 @@
        CmsTemplateEntity cmsTemplateEntity = this.baseMapper.selectByIdAndCompanyId(id,companyId);
        String name = cmsTemplateEntity.getName();
        Integer type = cmsTemplateEntity.getType();
        String templatePath = cmsProperties.getTemplatePath();
        String templatePath = FileUtils.path(cmsProperties.getTemplatePath(), company.getCode());
        String path = cmsTemplateEntity.getPath();
        this.baseMapper.delete(id,companyId);
        String pathNew = FileUtils.path(templatePath, path);
        pathNew = pathNew + "/" + company.getCode();
        log.info("模板写入地址:{}", pathNew);
        File file = new File(pathNew);
        FileUtil.touch(file);