From 129103e488cb52fd27adea4e38cb0ed4dba663f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=B6=E4=B8=9C?= <1654135867@qq.com> Date: Fri, 8 Nov 2024 17:26:47 +0800 Subject: [PATCH] =?UTF-8?q?CMS=E6=A0=8F=E7=9B=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demo/cms/controller/CmsColumnController.java | 15 ++++++++++----- .../jeecg/modules/demo/cms/entity/CmsColumn.java | 5 +++++ 2 files changed, 15 insertions(+), 5 deletions(-) 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; }