diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsColumnController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsColumnController.java index 2b3e03d..497dfa1 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsColumnController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsColumnController.java @@ -239,6 +239,7 @@ public class CmsColumnController extends JeecgController add(@RequestBody CmsColumn cmsColumn) { + cmsColumn.setPid("0"); cmsColumnService.save(cmsColumn); return Result.OK("添加成功!"); } @@ -270,11 +271,15 @@ public class CmsColumnController extends JeecgController delete(@RequestParam(name = "id", required = true) String id) { Result 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; } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/entity/CmsColumn.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/entity/CmsColumn.java index 29858f6..3852c01 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/entity/CmsColumn.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/entity/CmsColumn.java @@ -86,4 +86,9 @@ public class CmsColumn implements Serializable { @ApiModelProperty(value = "是否有子节点") @Dict(dicCode = "captain_code") private String hasChild; + + /**删除标记*/ + @Excel(name = "删除标记", width = 15) + @ApiModelProperty(value = "删除标记") + private java.lang.String isdel; }