mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-13 03:39:55 +08:00
update 后管订单列表新增字段
This commit is contained in:
@@ -163,10 +163,46 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
orderListVO.setPileConnectorCode(orderListVO.getPileSn() + orderListVO.getConnectorCode());
|
orderListVO.setPileConnectorCode(orderListVO.getPileSn() + orderListVO.getConnectorCode());
|
||||||
orderListVO.setOrderStatusDescribe(transformOrderStatusDescribe(orderListVO.getOrderStatus(), orderListVO.getPayStatus()));
|
orderListVO.setOrderStatusDescribe(transformOrderStatusDescribe(orderListVO.getOrderStatus(), orderListVO.getPayStatus()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 异步修改 虚拟金额和结算金额
|
||||||
|
tempUpdateVirtualAmount(orderListVOS);
|
||||||
}
|
}
|
||||||
return orderListVOS;
|
return orderListVOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void tempUpdateVirtualAmount(List<OrderListVO> orderListVOS) {
|
||||||
|
for (OrderListVO orderListVO : orderListVOS) {
|
||||||
|
if (orderListVO.getVirtualAmount() != null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
BigDecimal virtualAmount = BigDecimal.ZERO;
|
||||||
|
BigDecimal settleAmount = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
if (StringUtils.equals(orderListVO.getPayMode(), OrderPayModeEnum.PAYMENT_OF_BALANCE.getValue())) {
|
||||||
|
/*
|
||||||
|
余额支付 查询支付记录,如全部用本金支付,则虚拟金额为0,结算金额为订单消费金额,
|
||||||
|
如果使用了赠送金额,虚拟金额为赠送金额支付部分,结算金额=订单消费金额-虚拟金额消费部分
|
||||||
|
*/
|
||||||
|
// 查询支付记录
|
||||||
|
|
||||||
|
|
||||||
|
} else if (StringUtils.equals(orderListVO.getPayMode(), OrderPayModeEnum.PAYMENT_OF_WECHATPAY.getValue())) {
|
||||||
|
/*
|
||||||
|
微信支付 虚拟金额为0 结算金额等于订单消费金额
|
||||||
|
*/
|
||||||
|
settleAmount = new BigDecimal(orderListVO.getOrderAmount());
|
||||||
|
}
|
||||||
|
|
||||||
|
OrderBasicInfo build = OrderBasicInfo.builder()
|
||||||
|
.orderCode(orderListVO.getOrderCode())
|
||||||
|
.virtualAmount(virtualAmount)
|
||||||
|
.settleAmount(settleAmount)
|
||||||
|
.build();
|
||||||
|
updateOrderBasicInfo(build);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过订单状态和支付状态 转换订单状态描述
|
* 通过订单状态和支付状态 转换订单状态描述
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user