| | |
| | | import cc.mrbird.febs.common.controller.BaseController; |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.utils.AppContants; |
| | | import cc.mrbird.febs.mall.entity.MallGoodsCategory; |
| | | import cc.mrbird.febs.mall.service.IAdminMallGoodsCategoryService; |
| | | import cc.mrbird.febs.mall.service.IApiMallGoodsCategoryService; |
| | |
| | | return new FebsResponse().success().data(mallGoodsCategoryService.findAllCategoryList()); |
| | | } |
| | | |
| | | @GetMapping(value = "/categoryAppTree") |
| | | public FebsResponse categoryAppTree() { |
| | | return new FebsResponse().success().data(mallGoodsCategoryService.findAllAppCategoryList()); |
| | | } |
| | | |
| | | /** |
| | | * 商品分类-选择 |
| | | */ |
| | |
| | | return goodsCategoryService.delCategary(id); |
| | | } |
| | | |
| | | /** |
| | | * APP商品分类列表 |
| | | * @param mallGoodsCategory |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @GetMapping("categoryAppList") |
| | | public FebsResponse categoryAppList(MallGoodsCategory mallGoodsCategory, QueryRequest request) { |
| | | mallGoodsCategory.setIsApp(AppContants.IS_APP_CATEGORY); |
| | | Map<String, Object> data = getDataTable(goodsCategoryService.getCategoryList(mallGoodsCategory, request)); |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | | /** |
| | | * 商品分类-新增 |
| | | */ |
| | | @PostMapping("addAppCategory") |
| | | @ControllerEndpoint(operation = " 商品分类-新增", exceptionMessage = "操作失败") |
| | | public FebsResponse addAppCategory(@Valid MallGoodsCategory mallGoodsCategory) { |
| | | return goodsCategoryService.addAppCategory(mallGoodsCategory); |
| | | } |
| | | /** |
| | | * 商品分类-编辑 |
| | | */ |
| | | @PostMapping("updateAppCategory") |
| | | @ControllerEndpoint(operation = " 商品分类-编辑", exceptionMessage = "操作失败") |
| | | public FebsResponse updateAppCategory(@Valid MallGoodsCategory mallGoodsCategory) { |
| | | return goodsCategoryService.updateAppCategory(mallGoodsCategory); |
| | | } |
| | | /** |
| | | * 商品分类-删除 |
| | | */ |
| | | @GetMapping("delAppCategary/{id}") |
| | | @ControllerEndpoint(operation = " 商品分类-删除", exceptionMessage = "操作失败") |
| | | public FebsResponse delAppCategary(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return goodsCategoryService.delAppCategary(id); |
| | | } |
| | | |
| | | |
| | | } |