Procházet zdrojové kódy

fix 修改车票列表订单号查询

zoujiajian před 1 rokem
rodič
revize
2329e3552c

+ 6 - 1
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -235,7 +235,12 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 		}
 		conditionSql += ")";
 		if (StrUtil.isNotEmpty(orderNo)) {
-			conditionSql += String.format(" and exists(select 1 from order_don o where o.relation_id = gr.id and o.user_id = gr.user_id and o.order_no = %s and o.status not in ('close','noPayment','refund'))", orderNo);
+			OrderDon orderDon = orderDonMapper.selectOne(Wrappers.lambdaQuery(OrderDon.class)
+					.eq(OrderDon::getOrderNo, orderNo)
+					.notIn(OrderDon::getStatus, Constant.noOrderAllStatus)
+					.last("limit 1"));
+			Long orderId = orderDon != null ? orderDon.getId() : 0l;
+			conditionSql += String.format(" and exists(select 1 from order_don o where o.relation_id = gr.id and o.user_id = gr.user_id and o.id = %s)", orderId);
 		}
 		SearchResult<RenewalView> list = beanSearcher.search(RenewalView.class, builder
 				.field(RenewalView::getUserId, 0).op(Operator.GreaterThan)