|
@@ -211,7 +211,7 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
|
|
|
BigDecimal amount = calcTotalAmount(orderItemList);
|
|
|
if (!StringUtil.isEmpty(orderParam.getCouponId())) {
|
|
|
Map data = feignMecCouponAmount(orderParam.getCouponId(), amount);
|
|
|
- couponAmount = MapUtil.get(data, "mallCouponAmount", BigDecimal.class);
|
|
|
+ couponAmount = new BigDecimal(MapUtil.get(data, "mallCouponAmount", String.class));
|
|
|
}
|
|
|
if (couponAmount == null) {
|
|
|
couponAmount = BigDecimal.ZERO;
|
|
@@ -413,11 +413,12 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
|
|
|
userOrderPaymentService.saveOrUpdate(userOrderPayment);
|
|
|
}
|
|
|
// 记录余额支付金额
|
|
|
- BigDecimal balanceAmount1 = MapUtil.get(data, "balanceAmount", BigDecimal.class);
|
|
|
- if (BigDecimal.ZERO.compareTo(balanceAmount1) !=0 ) {
|
|
|
- order.setIntegrationAmount(balanceAmount1);
|
|
|
- order.setPayAmount(orderParam.getOrderAmount().subtract(balanceAmount1));
|
|
|
- orderMapper.updateByPrimaryKey(order);
|
|
|
+ String balanceAmount1 = MapUtil.get(data, "balanceAmount", String.class);
|
|
|
+ BigDecimal bigDecimal = new BigDecimal(balanceAmount1);
|
|
|
+ if (BigDecimal.ZERO.compareTo(bigDecimal) !=0 ) {
|
|
|
+ order.setIntegrationAmount(bigDecimal);
|
|
|
+ order.setPayAmount(orderParam.getOrderAmount().subtract(bigDecimal));
|
|
|
+ orderMapper.updateByPrimaryKeySelective(order);
|
|
|
}
|
|
|
result.put("pay",data);
|
|
|
|