zoujiajian há 2 anos atrás
pai
commit
eb4b1b645f

+ 1 - 0
netflix-service/src/main/java/com/cyksj/service/exchange/impl/ExchangeCodeServiceImpl.java

@@ -259,6 +259,7 @@ public class ExchangeCodeServiceImpl extends ServiceImpl<ExchangeCodeMapper, Exc
 			orderDon.setUserId(userId);
 			orderDon.setStatus(goodsDon.getType() == 1 && goodsDon.getSecondType() == 2 ? OrderDon.Status.complete : OrderDon.Status.hasPayment);
 			orderDon.setYhsId(yhsId);
+			orderDon.setExCode(exCodeOrderDon.getExCode());
 			orderDonMapper.updateById(orderDon);
 			if (orderDon.getIsDp()) {
 				//是否已经发送优惠加购车票

+ 7 - 0
netflix-web/src/main/java/com/cyksj/web/controller/external/ExternalController.java

@@ -90,6 +90,13 @@ public class ExternalController {
 				.eq(OrderDon::getExCode, exchangeCode.getCode())
 				.notIn(OrderDon::getStatus, Constant.noOrderAllStatus)
 				.last("limit 1"));
+		if (orderDon == null) {
+			orderDon = orderDonMapper.selectOne(Wrappers.lambdaQuery(OrderDon.class)
+					.eq(OrderDon::getUserId, exchangeCode.getUserId())
+					.eq(OrderDon::getType, OrderDon.Type.EX_CODE)
+					.notIn(OrderDon::getStatus, Constant.noOrderAllStatus)
+					.last("limit 1"));
+		}
 		if (orderDon != null) {
 			//将mirror车票清空
 			orderDon.setStatus(OrderDon.Status.refund);