|
|
@ -9,7 +9,10 @@ import com.hai.config.WxMsgConfig; |
|
|
|
import com.hai.dao.HighGasOrderPushMapper; |
|
|
|
import com.hai.dao.HighGasOrderPushMapper; |
|
|
|
import com.hai.entity.*; |
|
|
|
import com.hai.entity.*; |
|
|
|
import com.hai.enum_type.OrderPushType; |
|
|
|
import com.hai.enum_type.OrderPushType; |
|
|
|
|
|
|
|
import com.hai.enum_type.OrderStatusEnum; |
|
|
|
import com.hai.enum_type.RechargePayType; |
|
|
|
import com.hai.enum_type.RechargePayType; |
|
|
|
|
|
|
|
import com.hai.order.service.OrderService; |
|
|
|
|
|
|
|
import com.hai.order.type.OrderChildStatus; |
|
|
|
import com.hai.service.*; |
|
|
|
import com.hai.service.*; |
|
|
|
import com.hai.service.impl.OutRechargeOrderServiceImpl; |
|
|
|
import com.hai.service.impl.OutRechargeOrderServiceImpl; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.Api; |
|
|
@ -47,6 +50,12 @@ public class OrderTelChargeCallbackController { |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private ApiOrderRecordService apiOrderRecordService; |
|
|
|
private ApiOrderRecordService apiOrderRecordService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private HighOrderService highOrderService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private OrderService orderService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/rechargeCallbackByJj", method = RequestMethod.POST) |
|
|
|
@RequestMapping(value = "/rechargeCallbackByJj", method = RequestMethod.POST) |
|
|
|
@ApiOperation(value = "尖椒充值回调") |
|
|
|
@ApiOperation(value = "尖椒充值回调") |
|
|
@ -90,6 +99,7 @@ public class OrderTelChargeCallbackController { |
|
|
|
|
|
|
|
|
|
|
|
outRechargeOrderService.updateOrder(rechargeOrder); |
|
|
|
outRechargeOrderService.updateOrder(rechargeOrder); |
|
|
|
outRechargeChildOrderService.updateOrder(childOrder); |
|
|
|
outRechargeChildOrderService.updateOrder(childOrder); |
|
|
|
|
|
|
|
orderFinish(rechargeOrder); |
|
|
|
|
|
|
|
|
|
|
|
// api商户订单
|
|
|
|
// api商户订单
|
|
|
|
if (rechargeOrder.getPayType() == 6) { |
|
|
|
if (rechargeOrder.getPayType() == 6) { |
|
|
@ -153,6 +163,7 @@ public class OrderTelChargeCallbackController { |
|
|
|
|
|
|
|
|
|
|
|
outRechargeOrderService.updateOrder(rechargeOrder); |
|
|
|
outRechargeOrderService.updateOrder(rechargeOrder); |
|
|
|
outRechargeChildOrderService.updateOrder(childOrder); |
|
|
|
outRechargeChildOrderService.updateOrder(childOrder); |
|
|
|
|
|
|
|
orderFinish(rechargeOrder); |
|
|
|
if (rechargeOrder.getPayType() == 6) { |
|
|
|
if (rechargeOrder.getPayType() == 6) { |
|
|
|
apiOrderRecord(rechargeOrder); |
|
|
|
apiOrderRecord(rechargeOrder); |
|
|
|
} |
|
|
|
} |
|
|
@ -194,13 +205,7 @@ public class OrderTelChargeCallbackController { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
rechargeOrder.setRechargeStatus(203); |
|
|
|
outRechargeOrderService.refundOrder(rechargeOrder.getId() , childOrder); |
|
|
|
childOrder.setStatus(103); |
|
|
|
|
|
|
|
outRechargeOrderService.updateOrder(rechargeOrder); |
|
|
|
|
|
|
|
outRechargeChildOrderService.updateOrder(childOrder); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
outRechargeOrderService.rechargeOrderToRefund(rechargeOrder.getId()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 发送充值失败 微信小程序服务通知
|
|
|
|
// 发送充值失败 微信小程序服务通知
|
|
|
|
new Thread(() -> { |
|
|
|
new Thread(() -> { |
|
|
@ -215,6 +220,21 @@ public class OrderTelChargeCallbackController { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 订单完成操作
|
|
|
|
|
|
|
|
private void orderFinish(OutRechargeOrder rechargeOrder) { |
|
|
|
|
|
|
|
HighOrder highOrder = highOrderService.getOrderByOrderNo(rechargeOrder.getOrderNo()); |
|
|
|
|
|
|
|
if (highOrder != null) { |
|
|
|
|
|
|
|
highOrder.setOrderStatus(OrderStatusEnum.type3.getType()); |
|
|
|
|
|
|
|
highOrder.setFinishTime(new Date()); |
|
|
|
|
|
|
|
for (HighChildOrder highChildOrder : highOrder.getHighChildOrderList()) { |
|
|
|
|
|
|
|
highChildOrder.setChildOrderStatus(OrderChildStatus.STATUS3.getNumber()); |
|
|
|
|
|
|
|
highChildOrder.setFinishTime(new Date()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
orderService.updateOrderData(highOrder); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void apiOrderRecord(OutRechargeOrder rechargeOrder) { |
|
|
|
private void apiOrderRecord(OutRechargeOrder rechargeOrder) { |
|
|
|
Map<String, Object> orderMap = new HashMap<>(); |
|
|
|
Map<String, Object> orderMap = new HashMap<>(); |
|
|
|
orderMap.put("orderId" , rechargeOrder.getId()); |
|
|
|
orderMap.put("orderId" , rechargeOrder.getId()); |
|
|
|