xiaoyong931011
2021-09-17 fb5c4b3dd089665148fc592cbd70b1564d404657
src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallGoodsCategoryService.java
@@ -27,7 +27,7 @@
    @Override
    public IPage<MallGoodsCategory> getCategoryList(MallGoodsCategory mallGoodsCategory, QueryRequest request) {
        Page<MallGoodsCategory> page = new Page<>(request.getPageNum(), request.getPageSize());
        IPage<MallGoodsCategory> mallGoodsCategorys = this.baseMapper.selectCategoryList(page, mallGoodsCategory);
        IPage<MallGoodsCategory> mallGoodsCategorys = this.baseMapper.selectCategoryListInPage(page, mallGoodsCategory);
        return mallGoodsCategorys;
    }
@@ -44,7 +44,7 @@
        MallGoodsCategory goodsCategory = new MallGoodsCategory();
        goodsCategory.setName(name);
        goodsCategory.setIsComand(mallGoodsCategory.getIsComand());
        goodsCategory.setIsRecommend(mallGoodsCategory.getIsRecommend());
        if(ObjectUtil.isNotEmpty(mallGoodsCategory.getParentId())){
            Long parentId = mallGoodsCategory.getParentId();
            MallGoodsCategory mallGoodsCategoryParent = mallGoodsCategoryMapper.selectById(parentId);
@@ -54,6 +54,8 @@
            }else{
                goodsCategory.setParentIds(mallGoodsCategory.getParentId()+",");
            }
        }else{
            goodsCategory.setParentId(0L);
        }
        mallGoodsCategoryMapper.insert(goodsCategory);
        return new FebsResponse().success();