|
|
@@ -51,18 +51,22 @@ public class AccountServiceImpl extends MPJBaseServiceImpl<AccountMapper, Accoun
|
|
|
var vo = new UserRightsAndCouponsVo();
|
|
|
var userId = StpUtil.getLoginIdAsLong();
|
|
|
vo.setUserId(userId);
|
|
|
+
|
|
|
// 当前用户的充电权益(含已失效)
|
|
|
var userRechargeRight = userRechargeRightsService.lambdaQuery()
|
|
|
.eq(UserRechargeRights::getUserId, userId)
|
|
|
-// .eq(UserRechargeRights::getStatus, UserRechargeRights.STATUS_有效)
|
|
|
- .orderByAsc(UserRechargeRights::getEndTime).list();
|
|
|
+ .orderByDesc(UserRechargeRights::getStatus)
|
|
|
+ .orderByAsc(UserRechargeRights::getEndTime)
|
|
|
+ .list();
|
|
|
vo.setUserRechargeRightsList(userRechargeRight);
|
|
|
|
|
|
// 当前用户的优惠券列表(含已失效)
|
|
|
var usesrCouponList = userCouponService.lambdaQuery()
|
|
|
.eq(UserCoupon::getUserId, userId)
|
|
|
-// .eq(UserCoupon::getStatus, UserCoupon.STATUS_有效)
|
|
|
- .orderByAsc(UserCoupon::getEndTime).list();
|
|
|
+ .orderByDesc(UserCoupon::getStatus)
|
|
|
+ .orderByAsc(UserCoupon::getUsageStatus)
|
|
|
+ .orderByAsc(UserCoupon::getEndTime)
|
|
|
+ .list();
|
|
|
vo.setUserCouponList(usesrCouponList);
|
|
|
|
|
|
return vo;
|
|
|
@@ -78,11 +82,10 @@ public class AccountServiceImpl extends MPJBaseServiceImpl<AccountMapper, Accoun
|
|
|
vo.setUserRechargeRightsList(userRechargeRights);
|
|
|
|
|
|
// 当前用户有效的优惠券列表
|
|
|
- var userCouponList =userCouponService.listStationAvailableCoupons(Map.of("userId", userId, "stationId", stationId));
|
|
|
+ var userCouponList = userCouponService.listStationAvailableCoupons(Map.of("userId", userId, "stationId", stationId));
|
|
|
vo.setUserCouponList(userCouponList);
|
|
|
return vo;
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
}
|