|
|
@@ -91,12 +91,23 @@ public class CmsGroupRelationController {
|
|
|
* 代充平台 用户账号车票列表
|
|
|
*/
|
|
|
@GetMapping("/get/recharge")
|
|
|
- public Result<SearchResult<GroupsRelationRechargeView>> getRechargeList(String rechargeStatus) {
|
|
|
+ public Result<SearchResult<GroupsRelationRechargeView>> getRechargeList(String rechargeStatus, String orderNo) {
|
|
|
MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
|
|
|
if (StrUtil.isEmpty(rechargeStatus)) {
|
|
|
builder.field(GroupsRelationRechargeView::getRechargeStatus).op(Operator.NotNull);
|
|
|
}
|
|
|
- SearchResult<GroupsRelationRechargeView> search = beanSearcher.search(GroupsRelationRechargeView.class,builder
|
|
|
+ if (StrUtil.isNotBlank(orderNo)) {
|
|
|
+ OrderDon orderDon = orderDonMapper.selectOne(Wrappers.lambdaQuery(OrderDon.class)
|
|
|
+ .eq(OrderDon::getOrderNo, orderNo)
|
|
|
+ .last("limit 1"));
|
|
|
+ Long relationId = 0l;
|
|
|
+ if (orderDon != null) {
|
|
|
+ relationId = orderDon.getRelationId();
|
|
|
+ builder.field(GroupsRelationRechargeView::getUserId, orderDon.getUserId());
|
|
|
+ }
|
|
|
+ builder.field(GroupsRelationRechargeView::getRelationId, relationId);
|
|
|
+ }
|
|
|
+ SearchResult<GroupsRelationRechargeView> search = beanSearcher.search(GroupsRelationRechargeView.class, builder
|
|
|
.field(GroupsRelationRechargeView::getStatus, List.of(GroupsRelation.Status.validity.name(), GroupsRelation.Status.outside.name())).op(Operator.InList)
|
|
|
.build());
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|