| | |
| | | return ResponseEntity.ok(R.success(pageResult)); |
| | | } |
| | | |
| | | @GetMapping(value = "/{productId}}") |
| | | @GetMapping(value = "/{productId}") |
| | | @ApiOperation("查询商品") |
| | | // @PreAuthorize("@el.check('product:list')") |
| | | public ResponseEntity<?> getProduct(@PathVariable Long productId) { |
| | |
| | | return ResponseEntity.ok(R.success(product)); |
| | | } |
| | | |
| | | @GetMapping(value = "/{productId}}/details") |
| | | @ApiOperation("查询商品") |
| | | @GetMapping(value = "/{productId}/details") |
| | | @ApiOperation("查询商品详情") |
| | | // @PreAuthorize("@el.check('product:list')") |
| | | public ResponseEntity<?> getProductDetails(@PathVariable Long productId) { |
| | | Product product = productService.getById(productId); |
| | |
| | | return ResponseEntity.ok(R.success(product)); |
| | | } |
| | | |
| | | @GetMapping(value = "/{productId}}/images") |
| | | @ApiOperation("查询商品") |
| | | @GetMapping(value = "/{productId}/images") |
| | | @ApiOperation("查询商品图片") |
| | | // @PreAuthorize("@el.check('product:list')") |
| | | public ResponseEntity<?> getProductImages(@PathVariable Long productId) { |
| | | return ResponseEntity.ok(R.success(productImageService.queryImagesByProductId(productId))); |
| | | } |
| | | |
| | | |
| | | @GetMapping(value = "/{productId}}/labels") |
| | | @ApiOperation("查询商品") |
| | | @GetMapping(value = "/{productId}/labels") |
| | | @ApiOperation("查询商品标签信息") |
| | | // @PreAuthorize("@el.check('product:list')") |
| | | public ResponseEntity<?> getProductLabels(@PathVariable Long productId) { |
| | | return ResponseEntity.ok(R.success(productLabelService.queryLabelsByProductId(productId))); |