|
@@ -76,13 +76,16 @@ public class AdwebThemeController extends JeecgController<AdwebTheme, IAdwebThem
|
|
|
@Operation(summary = "adweb主题库-添加")
|
|
|
@PostMapping(value = "/add")
|
|
|
public Result<String> add(@RequestBody AdwebThemeParam adwebThemeParam) {
|
|
|
+ String tpCode = adwebThemeParam.getCode() + "tp";
|
|
|
+
|
|
|
+ // TODO 验证tpcode唯一,不能重复
|
|
|
+ // TODO 验证有效模板数量不超过50个
|
|
|
|
|
|
AdwebTheme adwebTheme = new AdwebTheme();
|
|
|
BeanUtil.copyProperties(adwebThemeParam, adwebTheme);
|
|
|
- adwebTheme.setCode(adwebThemeParam.getCode() + "tp");
|
|
|
+ adwebTheme.setCode(tpCode);
|
|
|
adwebTheme.setPutaway(1);
|
|
|
adwebThemeService.save(adwebTheme);
|
|
|
-
|
|
|
if (StringUtils.isNotBlank(adwebThemeParam.getCode())) {
|
|
|
AdwebSite adwebSite =
|
|
|
adwebSiteService.getOne(
|
|
@@ -114,6 +117,7 @@ public class AdwebThemeController extends JeecgController<AdwebTheme, IAdwebThem
|
|
|
value = "/edit",
|
|
|
method = {RequestMethod.PUT, RequestMethod.POST})
|
|
|
public Result<String> edit(@RequestBody AdwebTheme adwebTheme) {
|
|
|
+ // TODO 这里自动写入数据,并可以创建模板站点
|
|
|
adwebThemeService.updateById(adwebTheme);
|
|
|
return Result.OK("编辑成功!");
|
|
|
}
|