| | |
| | | insert.setRemark(category.getRemark()); |
| | | insert.setStatus(Constants.ZERO); |
| | | insert.setSortnum(category.getSortnum()); |
| | | insert.setBizType(category.getBizType()); |
| | | insert.setImgurl(category.getImgurl()); |
| | | insert.setType(category.getType()); |
| | | insert.setParentId(category.getParentId()); |
| | |
| | | //清空其他该bizType属性,只保留当前记录唯一有效 |
| | | categoryMapper.update(null,new UpdateWrapper<Category>().lambda() |
| | | .set(Category::getBizType,null) |
| | | .eq(Category::getBizType,category.getBizType()) |
| | | .ne(Category::getId,category.getId()) |
| | | ); |
| | | } |
| | |
| | | } |
| | | @Override |
| | | public List<Category> findChileList(Category model) { |
| | | if(Objects.isNull(model)){ |
| | | model = new Category(); |
| | | } |
| | | model.setIsdeleted(Constants.ZERO); |
| | | List<Category> list =findList(model); |
| | | List<Category> data = new ArrayList<>(); |
| | | if(list!=null){ |
| | |
| | | category.setGroupName( category.getParentName()+"/"+category.getName()); |
| | | data.add(category); |
| | | } |
| | | }else{ |
| | | data.add(category); |
| | | } |
| | | } |
| | | } |