| | |
| | | if (StrUtil.isEmpty(originalPrice)) { |
| | | return new FebsResponse().fail().message("商品规格原价不能为空"); |
| | | } |
| | | // addSku.setPresentPrice(addSku.getOriginalPrice()); |
| | | // String presentPrice = addSku.getPresentPrice(); |
| | | // if (StrUtil.isEmpty(presentPrice)) { |
| | | // return new FebsResponse().fail().message("商品规格现价不能为空"); |
| | | // } |
| | | String presentPrice = addSku.getPresentPrice(); |
| | | if (StrUtil.isEmpty(presentPrice)) { |
| | | return new FebsResponse().fail().message("商品规格现价不能为空"); |
| | | } |
| | | if (StrUtil.isEmpty(addSku.getLevelOnePrice()) |
| | | || StrUtil.isEmpty(addSku.getLevelTwoPrice()) |
| | | || StrUtil.isEmpty(addSku.getLevelThreePrice())) { |
| | |
| | | if (originalPrice.compareTo(BigDecimal.ZERO) <= 0) { |
| | | return new FebsResponse().fail().message("商品规格原价不能小于0"); |
| | | } |
| | | // addSku.setPresentPrice(addSku.getOriginalPrice()); |
| | | // BigDecimal presentPrice = addSku.getPresentPrice(); |
| | | // if (presentPrice.compareTo(BigDecimal.ZERO) < 0) { |
| | | // return new FebsResponse().fail().message("商品规格现价不能小于0"); |
| | | // } |
| | | if (addSku.getLevelOnePrice().compareTo(BigDecimal.ZERO) < 0) { |
| | | return new FebsResponse().fail().message("商品等级价格不能小于0"); |
| | | } |
| | | if (addSku.getLevelTwoPrice().compareTo(BigDecimal.ZERO) < 0) { |
| | | return new FebsResponse().fail().message("商品等级价格不能小于0"); |
| | | } |
| | | if (addSku.getLevelThreePrice().compareTo(BigDecimal.ZERO) < 0) { |
| | | return new FebsResponse().fail().message("商品等级价格不能小于0"); |
| | | BigDecimal presentPrice = addSku.getPresentPrice(); |
| | | if (presentPrice.compareTo(BigDecimal.ZERO) < 0) { |
| | | return new FebsResponse().fail().message("商品规格现价不能小于0"); |
| | | } |
| | | BigDecimal goodsWeight = addSku.getGoodsWeight(); |
| | | if(BigDecimal.ZERO.compareTo(goodsWeight) > 0){ |