Prechádzať zdrojové kódy

fix 返回车票订单信息

zoujiajian 2 rokov pred
rodič
commit
11e87f0cc3

+ 6 - 0
netflix-dao/src/main/java/com/cyksj/model/views/RenewalView.java

@@ -133,6 +133,12 @@ public class RenewalView {
     @DbField("gr.recharge_status")
     private GroupsRelation.RechargeStatus rechargeStatus;
 
+    @DbIgnore
+    private String orderNo;
+
+    @DbIgnore
+    private String transactionId;
+
     /**
      * 店铺id
      */

+ 11 - 5
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -158,12 +158,18 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 				}
 				ticket.setRemainDays(remainDays);
 			}
+			OrderDon orderDon = orderDonMapper.selectOne(Wrappers.lambdaQuery(OrderDon.class)
+					.eq(OrderDon::getRelationId, ticket.getRelationId())
+					.eq(OrderDon::getUserId, ticket.getUserId())
+					.notIn(OrderDon::getStatus, Constant.noOrderAllStatus)
+					.orderByDesc(OrderDon::getId)
+					.last("limit 1"));
+			if (orderDon != null) {
+				ticket.setOrderNo(orderDon.getOrderNo());
+				ticket.setTransactionId(orderDon.getTransactionId());
+			}
+
 			if (list.size() > 1 && ticket.getGoodsId() != 18) {
-				OrderDon orderDon = orderDonMapper.selectOne(Wrappers.lambdaQuery(OrderDon.class)
-						.eq(OrderDon::getRelationId, ticket.getRelationId())
-						.eq(OrderDon::getUserId, ticket.getUserId())
-						.orderByDesc(OrderDon::getId)
-						.last("limit 1"));
 				Date payTime = null;
 				if (orderDon != null) {
 					payTime = Optional.ofNullable(orderDon.getPayTime()).orElse(orderDon.getCreatedTime());