From 5af13ce83d194dc0d8c7b2dd7e5ae4863a689d31 Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Thu, 6 Apr 2023 15:53:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=8F=E7=9B=AE=E6=A0=87=E9=A2=98=E5=88=A4?= =?UTF-8?q?=E9=87=8D=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iasf/service/impl/SysColumnServiceImpl.java | 11 ++++++++++- .../com/huoran/iasf/vo/req/ColumnWeightReqVO.java | 9 +++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/huoran/iasf/service/impl/SysColumnServiceImpl.java b/src/main/java/com/huoran/iasf/service/impl/SysColumnServiceImpl.java index 41ff634..38e00a0 100644 --- a/src/main/java/com/huoran/iasf/service/impl/SysColumnServiceImpl.java +++ b/src/main/java/com/huoran/iasf/service/impl/SysColumnServiceImpl.java @@ -41,8 +41,17 @@ public class SysColumnServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); + + queryWrapper.eq("column_name", column.getColumnName()); - queryWrapper.eq("level", column.getLevel()); + + if (column.getId() != null) { + queryWrapper.eq("father_id", column.getId()); + } else { + queryWrapper.eq("father_id", 0); + } + + queryWrapper.eq("site_id", column.getSiteId()); queryWrapper.eq("deleted", 1); SysColumn sysColumn = mapper.selectOne(queryWrapper); diff --git a/src/main/java/com/huoran/iasf/vo/req/ColumnWeightReqVO.java b/src/main/java/com/huoran/iasf/vo/req/ColumnWeightReqVO.java index d3e06ab..100b5dd 100644 --- a/src/main/java/com/huoran/iasf/vo/req/ColumnWeightReqVO.java +++ b/src/main/java/com/huoran/iasf/vo/req/ColumnWeightReqVO.java @@ -21,9 +21,14 @@ public class ColumnWeightReqVO { @ApiModelProperty(value = "id") private Integer id; - @ApiModelProperty(value = "层级((1-一级分类 2-二级分类 3-三级分类以此叠加))") + /*@ApiModelProperty(value = "层级((1-一级分类 2-二级分类 3-三级分类以此叠加))") @NotNull(message = "层级不能为空") - private Integer level; + private Integer level;*/ + + + @ApiModelProperty(value = "父id") + private Integer fatherId; + @ApiModelProperty(value = "栏目名称") @NotNull(message = "栏目名称不能为空")