提交代码

2.0-dev
胡锐 7 months ago
parent 203f04be4e
commit 26b1496ac3
  1. 2
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  2. 17
      hai-cweb/src/main/java/com/cweb/controller/QzOrderController.java
  3. 18
      hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java

File diff suppressed because one or more lines are too long

@ -9,6 +9,8 @@ import com.hai.entity.HighChildOrder;
import com.hai.entity.HighGasOrderRefund; import com.hai.entity.HighGasOrderRefund;
import com.hai.entity.HighOrder; import com.hai.entity.HighOrder;
import com.hai.model.OrderRefundModel; import com.hai.model.OrderRefundModel;
import com.hai.order.type.OrderChildStatus;
import com.hai.order.type.OrderStatus;
import com.hai.service.HighOrderService; import com.hai.service.HighOrderService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -79,17 +81,24 @@ public class QzOrderController {
// 5:已支付(默认不发) 10:已出票 -5:已取消 15:交易成功 // 5:已支付(默认不发) 10:已出票 -5:已取消 15:交易成功
if (dataObject.getInteger("eventType") == -5) { if (dataObject.getInteger("eventType") == -5) {
childOrder.setChildOrderStatus(5); childOrder.setChildOrderStatus(OrderChildStatus.STATUS5.getNumber());
order.setOrderStatus(5); order.setOrderStatus(OrderStatus.STATUS5.getNumber());
order.setCancelTime(new Date()); order.setCancelTime(new Date());
order.setCancelRemarks(data.getString("cancelReason")); order.setCancelRemarks(data.getString("cancelReason"));
} }
if (dataObject.getInteger("eventType") == 15) { if (dataObject.getInteger("eventType") == 10) {
childOrder.setChildOrderStatus(OrderChildStatus.STATUS3.getNumber());
order.setOrderStatus(OrderStatus.STATUS3.getNumber());
order.setFinishTime(new Date());
}
// 交易成功:开场后两小时,订单状态从已出票自动变成交易成功
/* if (dataObject.getInteger("eventType") == 15) {
childOrder.setChildOrderStatus(3); childOrder.setChildOrderStatus(3);
order.setOrderStatus(3); order.setOrderStatus(3);
order.setFinishTime(new Date()); order.setFinishTime(new Date());
} }*/
} }
} }

@ -265,7 +265,7 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
} else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE4.getNumber())) { } else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE4.getNumber())) {
} else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE5.getNumber())) { } else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE5.getNumber())) {
cinemaHandle(order.getOrderNo());
} else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE6.getNumber())) { } else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE6.getNumber())) {
mobileRechargeHandle(order); mobileRechargeHandle(order);
} else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE7.getNumber())) { } else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE7.getNumber())) {
@ -581,6 +581,22 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
} }
/**
* 电影票
*/
private void cinemaHandle(String orderNo) throws Exception {
// 支付电影票
JSONObject object = QianZhuConfig.payMovieOrder(orderNo);
// 推送订单记录
HighGasOrderPush highGasOrderPush = new HighGasOrderPush();
highGasOrderPush.setType(OrderPushType.type4.getType());
highGasOrderPush.setOrderNo(orderNo);
highGasOrderPush.setCreateTime(new Date());
highGasOrderPush.setReturnContent(object.toJSONString());
highGasOrderPushMapper.insert(highGasOrderPush);
}
/** /**
* @Author Sum1Dream * @Author Sum1Dream
* @Name mobileRecharge * @Name mobileRecharge

Loading…
Cancel
Save