Commit 0979065b by xiaoer.li@freemud.com

fix

parent 13dfbfad
...@@ -144,6 +144,6 @@ public class ShoppingCartGoodsResponseVo extends ShoppingCartGoodsBaseResponseV ...@@ -144,6 +144,6 @@ public class ShoppingCartGoodsResponseVo extends ShoppingCartGoodsBaseResponseV
/** /**
* svc卡支付金额 * svc卡支付金额
*/ */
private Integer svcPayAmount; private String svcPayAmount;
} }
...@@ -1648,8 +1648,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1648,8 +1648,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
deliveryAmount = shoppingCartGoodsResponseVo.getDiscountDeliveryAmount().intValue(); deliveryAmount = shoppingCartGoodsResponseVo.getDiscountDeliveryAmount().intValue();
orderAmount += deliveryAmount; orderAmount += deliveryAmount;
} }
log.info("svcPrice:totalAmount:{},orderAmount:{},deliveryAmount:{}",shoppingCartGoodsResponseVo.getTotalAmount().intValue(),orderAmount,deliveryAmount);
if (svcTotalAmount>0 && svcTotalAmount>orderAmount) { if (svcTotalAmount>0 && svcTotalAmount>orderAmount) {
svcPayAmount = orderAmount; svcPayAmount = orderAmount;
shoppingCartGoodsResponseVo.setTotalAmount(0L); shoppingCartGoodsResponseVo.setTotalAmount(0L);
...@@ -1670,8 +1668,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1670,8 +1668,10 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
shoppingCartGoodsResponseVo.setTotalAmount(deliveryAmount.longValue()); shoppingCartGoodsResponseVo.setTotalAmount(deliveryAmount.longValue());
} }
*/ */
shoppingCartGoodsResponseVo.setSvcPayAmount(svcPayAmount/100); BigDecimal bigDecimal = new BigDecimal(svcPayAmount);
shoppingCartGoodsResponseVo.setSvcDiscountDesc("储值卡支付¥" + svcPayAmount/100); String amountStr = bigDecimal.divide(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP).toString();
shoppingCartGoodsResponseVo.setSvcPayAmount(amountStr);
shoppingCartGoodsResponseVo.setSvcDiscountDesc("储值卡支付¥" + amountStr);
//BigDecimal bigDecimal = new BigDecimal(orderAmount); //BigDecimal bigDecimal = new BigDecimal(orderAmount);
//String amountStr = bigDecimal.divide(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP).toString(); //String amountStr = bigDecimal.divide(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_HALF_UP).toString();
//shoppingCartGoodsResponseVo.setTotalAmount(0L); //shoppingCartGoodsResponseVo.setTotalAmount(0L);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment