Commit 1993cdbe by chongli

修复小程序赛事订单使用券的订单无法继续支付的问题

parent 37a619ed
......@@ -265,10 +265,18 @@ public abstract class AbstractOrderService<H extends AbstractOrderBean<T>, T> ex
this.checkContinuePayParameters(abstractOrderBean);
UserExt userExt = getUserExtDao().getByUid(abstractOrderBean.getUid());
Order order = this.getOrderDao().getOrderByOrderNo(abstractOrderBean.getOrderNo());
BigDecimal invoiceAmount = order.getInvoiceAmount() == null ? new BigDecimal(0) : order.getInvoiceAmount();
BigDecimal postageAmount = order.getPostageAmount() == null ? new BigDecimal(0) : order.getPostageAmount();
BigDecimal insuranceAmount = order.getInsuranceAmount() == null ? new BigDecimal(0) : order.getInsuranceAmount();
BigDecimal needPayAmount = order.getPrePayAmount().add(invoiceAmount).add(postageAmount).add(insuranceAmount).subtract(order.getPrePayCardAmount()).subtract(order.getVoucherAmount());
ResponseMp<JSONObject> response = new ResponseMp<JSONObject>();
JSONObject jSONObject = new JSONObject();
try {
jSONObject = WeiXinAtcion.weixinPlay(userExt.getMiniAppOpenId(),order.getAmount().multiply(new BigDecimal("100")).intValue(), order.getOrderNo()+"", this.getNotifyUrlForWeiXinPay(order), "dingqiu");
jSONObject = WeiXinAtcion.weixinPlay(userExt.getMiniAppOpenId(),needPayAmount.multiply(new BigDecimal("100")).intValue(), order.getOrderNo()+"", this.getNotifyUrlForWeiXinPay(order), "dingqiu");
jSONObject.put("needWXPay", true);
response.setBody(jSONObject);
} catch (Exception e) {
......
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 sign in to comment