xiaoyong931011
2021-06-25 6e686b5f3e261b7c6a0bd95993a3dceceeeea9ab
gc-shop/src/main/java/com/xzx/gc/shop/controller/AdminGoodsCategoryController.java
@@ -48,6 +48,18 @@
    }
    /**
     * 查询商品分类--所有一级分类
     * xzx_score_goods_category商品分类
     */
    @PostMapping(Constants.ADMIN_VIEW_PREFIX+"/score/goods/viewGoodsCategoryList.json")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = ViewGoodsCategoryListVo.class)})
    @ApiOperation(value = "商品分类管理--所有一级分类", notes = "test: 仅0有正确返回")
    public JsonResult<List<ViewGoodsCategoryListVo>> viewGoodsCategoryList(@RequestBody ViewGoodsCategoryListDto viewGoodsCategoryListDto) {
        List<ViewGoodsCategoryListVo> result = goodsService.viewGoodsCategoryList(viewGoodsCategoryListDto);
        return JsonResult.success(result);
    }
    /**
     * 添加商品分类
     */
    @PostMapping(Constants.ADMIN_VIEW_PREFIX+"/score/goods/addGoodsCategory.json")
@@ -150,6 +162,9 @@
        if(!parentId.equals(scoreGoodsCategory.getParentId())){
            scoreGoodsCategory.setParentId(parentId);
        }
        if(parentId.equals(id)){
            return JsonResult.failMessage("父类不能为自己!");
        }
        GoodsCategoryModel goodsCategoryModel = new GoodsCategoryModel();
        goodsCategoryModel.setName(name);