CMS栏目修改

master
王家东 2 weeks ago
parent 83249a8b99
commit 129103e488
  1. 15
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/controller/CmsColumnController.java
  2. 5
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/cms/entity/CmsColumn.java

@ -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;
}

@ -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;
}

Loading…
Cancel
Save