...
|
...
|
@@ -31,6 +31,7 @@ import com.yohoufo.order.service.IPaymentService; |
|
|
import com.yohoufo.order.service.SellerOrderPaymentService;
|
|
|
import com.yohoufo.order.service.pay.AbstractPayService;
|
|
|
import com.yohoufo.order.service.pay.alipay.AlipayOuyinService;
|
|
|
import com.yohoufo.order.service.pay.weixin.WeixinMiniappPayService;
|
|
|
import com.yohoufo.order.service.pay.weixin.WeixinPayUFORealAppService;
|
|
|
import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
|
|
|
import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta;
|
...
|
...
|
@@ -89,7 +90,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
OrdersPayTransferMapper ordersPayTransferMapper;
|
|
|
|
|
|
@Autowired
|
|
|
ManualTransferMapper manualTransferMapper;
|
|
|
WeixinMiniappPayService weixinMiniappPayService;
|
|
|
|
|
|
@Autowired
|
|
|
BuyerOrderMapper buyerOrderMapper;
|
...
|
...
|
@@ -120,9 +121,8 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
if (codeMeta.getType() == OrderCodeType.BUYER_TYPE.getType()){
|
|
|
paymentService = this.buyerOrderPaymentService;
|
|
|
|
|
|
}else{
|
|
|
}else if(codeMeta.getType() == OrderCodeType.SELLER_TYPE.getType()){
|
|
|
paymentService = this.sellerOrderPaymentService;
|
|
|
|
|
|
}
|
|
|
|
|
|
return paymentService;
|
...
|
...
|
@@ -131,7 +131,7 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
|
|
|
/**
|
|
|
* 获取支付的主场service
|
|
|
* @param payment
|
|
|
* @param paymentCode
|
|
|
* @return
|
|
|
*/
|
|
|
private AbstractPayService getPayService(int paymentCode){
|
...
|
...
|
@@ -146,8 +146,10 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
|
|
|
if (payment == Payment.WECHAT){
|
|
|
payService = weixinPayAppService;
|
|
|
}else {
|
|
|
}else if(payment == Payment.ALIPAY){
|
|
|
payService = alipayService;
|
|
|
}else if(payment == Payment.MINIAPP){
|
|
|
payService = weixinMiniappPayService;
|
|
|
}
|
|
|
|
|
|
return payService;
|
...
|
...
|
@@ -966,7 +968,8 @@ public class PaymentServiceImpl implements IPaymentService { |
|
|
|
|
|
// check 订单是否存在
|
|
|
OrderInfo orderInfo = paymentService.getOrderInfo(request.getOrderCode(), request.getUid());
|
|
|
|
|
|
//将openID 附属在 orderinfo上,用于拼接支付URL
|
|
|
orderInfo.setOpenid(request.getOpenid());
|
|
|
// 卖家or买家订单,支付方式更新,返回实付金额
|
|
|
BigDecimal amount = paymentService.checkUpdOrderCodePayment(orderInfo, request);
|
|
|
|
...
|
...
|
|