| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | /*@PreAuthorize("@el.check('merchant:product:byProductId')")*/ |
| | | public ResponseEntity<?> getProductDetails(@PathVariable Long productId) { |
| | | Product product = productService.getById(productId); |
| | | if (ObjUtil.isEmpty(product)) { |
| | | return ResponseEntity.ok(R.success()); |
| | | } |
| | | ProductCustomerView customerView = new ProductCustomerView(); |
| | | BeanUtil.copyProperties(product, customerView); |
| | | if (ObjUtil.isNotEmpty(product)) { |