|
|
|
@ -239,6 +239,7 @@ public class CmsColumnController extends JeecgController<CmsColumn, ICmsColumnSe |
|
|
|
|
// @RequiresPermissions("cms:cms_column:add")
|
|
|
|
|
@PostMapping(value = "/add") |
|
|
|
|
public Result<String> add(@RequestBody CmsColumn cmsColumn) { |
|
|
|
|
cmsColumn.setPid("0"); |
|
|
|
|
cmsColumnService.save(cmsColumn); |
|
|
|
|
return Result.OK("添加成功!"); |
|
|
|
|
} |
|
|
|
@ -270,11 +271,15 @@ public class CmsColumnController extends JeecgController<CmsColumn, ICmsColumnSe |
|
|
|
|
public Result<CmsColumn> delete(@RequestParam(name = "id", required = true) String id) { |
|
|
|
|
Result<CmsColumn> result = new Result(); |
|
|
|
|
CmsColumn sysCategory = cmsColumnService.getById(id); |
|
|
|
|
if (sysCategory == null) { |
|
|
|
|
result.error500("未找到对应实体"); |
|
|
|
|
} else { |
|
|
|
|
this.cmsColumnService.delete(id); |
|
|
|
|
result.success("删除成功!"); |
|
|
|
|
if (sysCategory.getIsdel().equals("Y")) { |
|
|
|
|
if (sysCategory == null) { |
|
|
|
|
result.error500("未找到对应实体"); |
|
|
|
|
} else { |
|
|
|
|
this.cmsColumnService.delete(id); |
|
|
|
|
result.success("删除成功!"); |
|
|
|
|
} |
|
|
|
|
}else { |
|
|
|
|
result.success("基础设置不可删除!"); |
|
|
|
|
} |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|