|
@@ -198,7 +198,7 @@ public class ProductInfoServiceImpl implements ProductInfoService {
|
|
throw new BackendRuntimeException(ExceptionEnum.EXCEPTION_PRODUCT_NOT_EXIST);
|
|
throw new BackendRuntimeException(ExceptionEnum.EXCEPTION_PRODUCT_NOT_EXIST);
|
|
}
|
|
}
|
|
// 目前只支持标准买断可以批量购买的阶梯价格 advanced-permanent
|
|
// 目前只支持标准买断可以批量购买的阶梯价格 advanced-permanent
|
|
- BigDecimal batchPrice, totalPrice, cnyBatchPrice, cnyTotalPrice;
|
|
|
|
|
|
+ BigDecimal batchPrice, totalPrice, cnyBatchPrice, cnyTotalPrice, discountPrice, cnyDiscountPrice;
|
|
if ("advanced-permanent".equals(productVO.getCode())) {
|
|
if ("advanced-permanent".equals(productVO.getCode())) {
|
|
// 标准买断
|
|
// 标准买断
|
|
// 2-5 10% OFF $107.99/个 ¥701.93/个
|
|
// 2-5 10% OFF $107.99/个 ¥701.93/个
|
|
@@ -240,14 +240,19 @@ public class ProductInfoServiceImpl implements ProductInfoService {
|
|
} else {
|
|
} else {
|
|
throw new BackendRuntimeException(ExceptionEnum.EXCEPTION_PRODUCT_NOT_SUPPORT_BATCH);
|
|
throw new BackendRuntimeException(ExceptionEnum.EXCEPTION_PRODUCT_NOT_SUPPORT_BATCH);
|
|
}
|
|
}
|
|
|
|
+ discountPrice = productVO.getPrice().multiply(BigDecimal.valueOf(num)).subtract(totalPrice);
|
|
|
|
+ cnyDiscountPrice = productVO.getCnyPrice().multiply(BigDecimal.valueOf(num)).subtract(cnyTotalPrice);
|
|
Map<String, String> map = new HashMap<>();
|
|
Map<String, String> map = new HashMap<>();
|
|
map.put("productId", productId);
|
|
map.put("productId", productId);
|
|
|
|
+ map.put("num", String.valueOf(num));
|
|
map.put("price", productVO.getPrice().toEngineeringString());
|
|
map.put("price", productVO.getPrice().toEngineeringString());
|
|
map.put("cnyPrice", productVO.getCnyPrice().toEngineeringString());
|
|
map.put("cnyPrice", productVO.getCnyPrice().toEngineeringString());
|
|
map.put("batchPrice", batchPrice.toEngineeringString());
|
|
map.put("batchPrice", batchPrice.toEngineeringString());
|
|
map.put("totalPrice", totalPrice.toEngineeringString());
|
|
map.put("totalPrice", totalPrice.toEngineeringString());
|
|
|
|
+ map.put("discountPrice", discountPrice.toEngineeringString());
|
|
map.put("cnyBatchPrice", cnyBatchPrice.toEngineeringString());
|
|
map.put("cnyBatchPrice", cnyBatchPrice.toEngineeringString());
|
|
map.put("cnyTotalPrice", cnyTotalPrice.toEngineeringString());
|
|
map.put("cnyTotalPrice", cnyTotalPrice.toEngineeringString());
|
|
|
|
+ map.put("cnyDiscountPrice", cnyDiscountPrice.toEngineeringString());
|
|
return map;
|
|
return map;
|
|
|
|
|
|
}
|
|
}
|