| | |
| | | @RestController |
| | | @RequestMapping("/business/goods") |
| | | public class GoodsController extends BaseController { |
| | | |
| | | @Autowired |
| | | private GoodsService goodsService; |
| | | |
| | |
| | | |
| | | |
| | | @ApiOperation("商品上下架状态修改") |
| | | @PostMapping("/updateStatusById") |
| | | @PostMapping("/updateStatus") |
| | | @RequiresPermissions("business:goods:update") |
| | | public ApiResponse updateStatusById(@RequestBody List<Goods> list) { |
| | | public ApiResponse updateStatus(@RequestBody List<Goods> list) { |
| | | goodsService.updateStatusById(list); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | public ApiResponse<PageData<Goods>> findPage (@RequestBody PageWrap<Goods> pageWrap) { |
| | | return ApiResponse.success(goodsService.findPage(pageWrap)); |
| | | } |
| | | @ApiOperation("列表查询") |
| | | @PostMapping("/list") |
| | | @RequiresPermissions("business:goods:query") |
| | | public ApiResponse<List<Goods>> findList (@RequestBody Goods pageWrap) { |
| | | return ApiResponse.success(goodsService.findList(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("根据专区分类查询商品") |