| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 商品分类-全部选择 |
| | | */ |
| | | @GetMapping("categorys/allTree") |
| | | @ControllerEndpoint(exceptionMessage = "获取分类失败") |
| | | public List<AdminMallGoodsCategoryTreeVo> getAllCategorys(){ |
| | | return goodsCategoryService.getAllCategorys(); |
| | | } |
| | | |
| | | /** |
| | | * 商品分类-新增 |
| | | */ |
| | | @PostMapping("addCategory") |
| | |
| | | public FebsResponse updateCategory(@Valid MallGoodsCategory mallGoodsCategory) { |
| | | return goodsCategoryService.updateCategory(mallGoodsCategory); |
| | | } |
| | | |
| | | /** |
| | | * 商品分类-删除 |
| | | */ |
| | | @GetMapping("delCategary/{id}") |
| | | @ControllerEndpoint(operation = " 商品分类-删除", exceptionMessage = "操作失败") |
| | | public FebsResponse delCategary(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return goodsCategoryService.delCategary(id); |
| | | } |
| | | |
| | | |
| | | } |