p-honggang.li
5 天以前 ac918503bb5e8fad007348e7e39ba7275b75f334
src/main/java/com/webmanage/controller/ProductPricingController.java
@@ -10,6 +10,7 @@
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.*;
@@ -107,9 +108,9 @@
     */
    @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);
@@ -126,13 +127,14 @@
    @GetMapping("/condition")
    @ApiOperation("根据条件查询产品定价")
    public Result<List<ProductPricing>> getPricingByCondition(
            @ApiParam("产品ID") @RequestParam(required = false) String productId,
            @ApiParam("套件名称") @RequestParam(required = false) String suiteName,
            @ApiParam("销售形式") @RequestParam(required = false) String salesForm,
            @ApiParam("客户对象") @RequestParam(required = false) String customerType,
            @ApiParam("价格类型") @RequestParam(required = false) String priceType,
            @ApiParam("启用状态") @RequestParam(required = false) Boolean isActive) {
        try {
            List<ProductPricing> result = productPricingService.getPricingByCondition(
            List<ProductPricing> result = productPricingService.getPricingByCondition(productId,
                    suiteName, salesForm, customerType, priceType, isActive);
            return Result.success("查询成功", result);
        } catch (Exception e) {