栏目标题判重完善

master
rong.liu 2 years ago
parent 22cc03c9cd
commit 5af13ce83d
  1. 11
      src/main/java/com/huoran/iasf/service/impl/SysColumnServiceImpl.java
  2. 9
      src/main/java/com/huoran/iasf/vo/req/ColumnWeightReqVO.java

@ -41,8 +41,17 @@ public class SysColumnServiceImpl extends ServiceImpl<SysColumnMapper, SysColumn
@Override
public boolean sameLevelJudgment(ColumnWeightReqVO column) {
QueryWrapper<SysColumn> 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);

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

Loading…
Cancel
Save