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 = "栏目名称不能为空")