tongzhizudian
This commit is contained in:
@ -424,11 +424,12 @@ public class WechatPayService {
|
||||
|
||||
if(OrderStatus.equals("WAIT_PAY")){
|
||||
orderPayMapper.updateOrderStatus(orderMain.getOrderNo(),"WAIT_PICK");
|
||||
}else if (OrderStatus.equals("RERENT_WAIT_PAY")){
|
||||
}else if (OrderStatus.equals("RERENT_WAIT_PAY") || OrderStatus.equals("RENT_ING")){
|
||||
OrderSub orderSub = orderPayMapper.getSubOrderByTradeNo(outTradeNo);
|
||||
orderPayMapper.updateOrderStatusAndEndRentTime(orderMain.getOrderNo(),orderSub.getReturnTime(),0,orderMain.getOrderAmount().add(orderSub.getAmount()),"RENT_ING");
|
||||
//发送租电订单同步
|
||||
Long batterySubOrderId = orderPayMapper.getSubOrderIdByTradeNo(outTradeNo);
|
||||
logger.info("发送租电订单同步: {}", batterySubOrderId);
|
||||
syncInteg.sendSubOrderId(batterySubOrderId);
|
||||
}
|
||||
orderPayMapper.updateSubOrderPaymentStatus(outTradeNo,"WX_PAY",PayStatus.SUCCESS.getCode(),transactionId);
|
||||
|
||||
@ -16,6 +16,7 @@ import com.sczx.pay.mapper.OrderPayMapper;
|
||||
import com.sczx.pay.mapper.PaymentRecordMapper;
|
||||
import com.sczx.pay.mapper.RefundRecordMapper;
|
||||
import com.sczx.pay.service.AlipayRentService;
|
||||
import com.sczx.pay.thirdpart.integration.SyncInteg;
|
||||
import com.sczx.pay.utils.AlipaySdkUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -51,6 +52,10 @@ public class AlipayRentServiceImpl implements AlipayRentService {
|
||||
@Autowired
|
||||
private OrderPayMapper orderPayMapper;
|
||||
|
||||
@Autowired
|
||||
private SyncInteg syncInteg;
|
||||
|
||||
|
||||
@Override
|
||||
public AlipayRentPayResponse rentPay(AlipayRentPayReq alipayRentPayReq) {
|
||||
AlipayRentPayResponse response = new AlipayRentPayResponse();
|
||||
@ -154,9 +159,13 @@ public class AlipayRentServiceImpl implements AlipayRentService {
|
||||
|
||||
if(OrderStatus.equals("WAIT_PAY")){
|
||||
orderPayMapper.updateOrderStatus(orderMain.getOrderNo(),"WAIT_PICK");
|
||||
}else if (OrderStatus.equals("RERENT_WAIT_PAY")){
|
||||
}else if (OrderStatus.equals("RERENT_WAIT_PAY") || OrderStatus.equals("RENT_ING")){
|
||||
OrderSub orderSub = orderPayMapper.getSubOrderByTradeNo(outTradeNo);
|
||||
orderPayMapper.updateOrderStatusAndEndRentTime(orderMain.getOrderNo(),orderSub.getReturnTime(),0,orderMain.getOrderAmount().add(orderSub.getAmount()),"RENT_ING");
|
||||
//发送租电订单同步
|
||||
Long batterySubOrderId = orderPayMapper.getSubOrderIdByTradeNo(outTradeNo);
|
||||
log.info("发送租电订单同步: {}", batterySubOrderId);
|
||||
syncInteg.sendSubOrderId(batterySubOrderId);
|
||||
}
|
||||
orderPayMapper.updateSubOrderPaymentStatus(outTradeNo,"ZFB_PAY", PayStatus.SUCCESS.getCode(),tradeNo);
|
||||
return true;
|
||||
|
||||
@ -551,11 +551,12 @@ public class AlipayServiceImpl implements AlipayService {
|
||||
|
||||
if(OrderStatus.equals("WAIT_PAY")){
|
||||
orderPayMapper.updateOrderStatus(orderMain.getOrderNo(),"WAIT_PICK");
|
||||
}else if (OrderStatus.equals("RERENT_WAIT_PAY")){
|
||||
}else if (OrderStatus.equals("RERENT_WAIT_PAY") || OrderStatus.equals("RENT_ING")){
|
||||
OrderSub orderSub = orderPayMapper.getSubOrderByTradeNo(outTradeNo);
|
||||
orderPayMapper.updateOrderStatusAndEndRentTime(orderMain.getOrderNo(),orderSub.getReturnTime(),0,orderMain.getOrderAmount().add(orderSub.getAmount()),"RENT_ING");
|
||||
//发送租电订单同步
|
||||
Long batterySubOrderId = orderPayMapper.getSubOrderIdByTradeNo(outTradeNo);
|
||||
log.info("发送租电订单同步: {}", batterySubOrderId);
|
||||
syncInteg.sendSubOrderId(batterySubOrderId);
|
||||
}
|
||||
orderPayMapper.updateSubOrderPaymentStatus(outTradeNo,"ZFB_PAY", PayStatus.SUCCESS.getCode(),tradeNo);
|
||||
|
||||
Reference in New Issue
Block a user