| | |
| | | .le("startTime", new Date()) |
| | | .ge("endTime", new Date()) |
| | | .eq("status", 1) |
| | | .orderByDesc("insertTime", "id") |
| | | ); |
| | | if (request.getShopId()!=null){ |
| | | List<Integer> storeId = new ArrayList<>(); |
| | |
| | | List<PointsMerchandise> pointsMerchandiseList = pmdsService.lambdaQuery() |
| | | .eq(PointsMerchandise::getState, 1) |
| | | .eq(PointsMerchandise::getShelves,1) |
| | | .in(PointsMerchandise::getId, pointsMerchandiseIds).list(); |
| | | .in(PointsMerchandise::getId, pointsMerchandiseIds) |
| | | .orderByDesc(PointsMerchandise::getInsertTime, PointsMerchandise::getId) |
| | | .list(); |
| | | |
| | | list = pointsMerchandiseList; |
| | | } |
| | |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy-MM-dd"); |
| | | List<UserPointsMerchandise> pointsMerchandises = upmseService.list(new QueryWrapper<UserPointsMerchandise>() |
| | | .eq("userId", appUserId).eq("payStatus", 2)); |
| | | .eq("userId", appUserId).eq("payStatus", 2) |
| | | .orderByDesc("insertTime", "id")); |
| | | List<PointsMerchandiseStore> pointsMerchandiseStoreList = pointsMerchandiseStoreService.list(); |
| | | Map<Integer, List<PointsMerchandiseStore>> pointsMerchandiseStoreMap = pointsMerchandiseStoreList.stream().collect(Collectors.groupingBy(PointsMerchandiseStore::getPointsMerchandiseId)); |
| | | |
| | |
| | | List<UserCoupon> userCoupons = new ArrayList<>(); |
| | | if (ids.size() > 0) { |
| | | userCoupons = userCouponService.list(new QueryWrapper<UserCoupon>().eq("userId", appUserId).in("couponId", ids) |
| | | .ne("status", 3)); |
| | | .ne("status", 3) |
| | | .orderByDesc("insertTime", "id")); |
| | | } |
| | | if (pointsMerchandises.size() > 0) { |
| | | for (UserPointsMerchandise pointsMerchandise : pointsMerchandises) { |
| | |
| | | |
| | | // 2.0新增会员权益赠送门票 |
| | | List<VipDetail> list = vipDetailService.lambdaQuery() |
| | | .eq(VipDetail::getAppUserId, appUserId).eq(VipDetail::getType, 2).list(); |
| | | .eq(VipDetail::getAppUserId, appUserId) |
| | | .eq(VipDetail::getType, 2) |
| | | .orderByDesc(VipDetail::getInsertTime, VipDetail::getId) |
| | | .list(); |
| | | for (VipDetail vipDetail : list) { |
| | | ExchangeDetailsResponse detailsResponse = new ExchangeDetailsResponse(); |
| | | // 添加-用于区分会员权益门票 |
| | |
| | | } |
| | | responses.add(detailsResponse); |
| | | } |
| | | Comparator<ExchangeDetailsResponse> comparator = Comparator.comparing(ExchangeDetailsResponse::getStartTime).reversed(); |
| | | Collections.sort(responses, comparator); |
| | | detailsVo.setDetailsResponses(responses); |
| | | |
| | | } |
| | | responses.sort(Comparator.comparing(ExchangeDetailsResponse::getStartTime, |
| | | Comparator.nullsLast(Comparator.reverseOrder())) |
| | | .thenComparing(ExchangeDetailsResponse::getDetailsId, Comparator.reverseOrder())); |
| | | detailsVo.setDetailsResponses(responses); |
| | | return detailsVo; |
| | | } |
| | | |