| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | */ |
| | | @GetMapping("/product/{productId}") |
| | | @ApiOperation("根据产品ID查询定价列表") |
| | | public Result<List<ProductPricing>> getPricingByProductId(@ApiParam("产品ID") @PathVariable Long productId) { |
| | | public Result<List<ProductPricing>> getPricingByProductId(@ApiParam("产品ID") @PathVariable String productId) { |
| | | try { |
| | | if (productId == null) { |
| | | if (!StringUtils.hasText(productId)) { |
| | | return Result.error("产品ID不能为空"); |
| | | } |
| | | List<ProductPricing> result = productPricingService.getPricingByProductId(productId); |