Commit b1b91cd0 by sdif

区分APP和小程序支付类型

parent 0e85e266
...@@ -751,6 +751,21 @@ public class TotalOrderServiceImpl implements ITotalOrderService { ...@@ -751,6 +751,21 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
orderRequest.setTradeType("JSAPI"); orderRequest.setTradeType("JSAPI");
}else if(bo.getPaymentType() == 1){ }else if(bo.getPaymentType() == 1){
orderRequest.setTradeType("APP"); orderRequest.setTradeType("APP");
TotalOrder totalOrder1 = baseMapper.selectOne(new LambdaQueryWrapper<TotalOrder>().eq(TotalOrder::getOrderSn, totalOrder.getOrderSn()));
if (totalOrder1.getStatus() == 0) {
// 修改订单状态为已支付
totalOrder1.setStatus(1);
baseMapper.updateById(totalOrder1);
// 添加支付记录
PaymentRecord paymentRecord = new PaymentRecord();
paymentRecord.setPayType(0);
paymentRecord.setOrderId(totalOrder1.getId().intValue());
paymentRecord.setMoney(totalOrder1.getPayMoney());
paymentRecord.setUid(totalOrder1.getUid());
paymentRecordMapper.insert(paymentRecord);
return true;
}
} }
}else { }else {
orderRequest.setOpenid(openId); orderRequest.setOpenid(openId);
......
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