|
|
@@ -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)
|