|
|
@@ -4172,7 +4172,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
else if(param.getPayType().equals(2)){
|
|
|
order.setPayType("2");
|
|
|
BigDecimal payMoney=order.getPayPrice().multiply(new BigDecimal(storeConfig.getPayRate())).divide(new BigDecimal(100));
|
|
|
- payMoney=new BigDecimal(payMoney.setScale(0, BigDecimal.ROUND_HALF_UP).longValue());
|
|
|
+ payMoney=new BigDecimal(payMoney.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
// 如果小程序需要支付的金额小于0.01元,不能走物流代收,让走货到付款 xgb
|
|
|
if (payMoney.compareTo(new BigDecimal("0.01")) < 0) {
|
|
|
return R.error("物流代收计算支付金额为0,不允许选择物流代收");
|
|
|
@@ -4730,7 +4730,11 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
// 物流代收
|
|
|
order.setPayType("2");
|
|
|
BigDecimal payMoney=order.getPayPrice().multiply(new BigDecimal(storeConfig.getPayRate())).divide(new BigDecimal(100));
|
|
|
- payMoney=new BigDecimal(payMoney.setScale(0, BigDecimal.ROUND_HALF_UP).longValue());
|
|
|
+ payMoney=new BigDecimal(payMoney.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
|
|
|
+ // 如果小程序需要支付的金额小于0.01元,不能走物流代收,让走货到付款 xgb
|
|
|
+ if (payMoney.compareTo(new BigDecimal("0.01")) < 0) {
|
|
|
+ return R.error("物流代收计算支付金额为0,不允许选择物流代收");
|
|
|
+ }
|
|
|
order.setPayDelivery(order.getPayPrice().subtract(payMoney));
|
|
|
order.setPayMoney(payMoney);
|
|
|
}
|