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