| | |
| | | public ExchangeDetailsVo getIntegralExchangeDetails(@RequestBody Integer appUserId) { |
| | | ExchangeDetailsVo detailsVo = new ExchangeDetailsVo(); |
| | | List<ExchangeDetailsResponse> responses = new ArrayList<>(); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | List<UserPointsMerchandise> pointsMerchandises = upmseService.list(new QueryWrapper<UserPointsMerchandise>() |
| | | .eq("userId", appUserId).eq("payStatus", 2)); |
| | | |
| | |
| | | detailsResponse.setGoodName(vipDetail.getTicketName()); |
| | | detailsResponse.setStartTime(simpleDateFormat.format(vipDetail.getStartTime())); |
| | | detailsResponse.setEndTime(simpleDateFormat.format(vipDetail.getEndTime())); |
| | | |
| | | detailsResponse.setUseStatus(vipDetail.getStatus()); |
| | | detailsResponse.setUseStatus(vipDetail.getStatus()==1?2:1); |
| | | detailsResponse.setGoodType(3); |
| | | // 表明是会员赠送的门票 |
| | | detailsResponse.setExchangeType(3); |
| | | detailsResponse.setExchangeType(4); |
| | | // 全国通用 |
| | | detailsResponse.setRid(Collections.singletonList(0)); |
| | | detailsResponse.setSid(Collections.singletonList(0)); |
| | |
| | | detailsResponse.setIntegral(c.getIntegral().intValue()); |
| | | detailsResponse.setCash(c.getCash()); |
| | | } |
| | | if (userCoupon.getIsVipGrant()!=null && userCoupon.getIsVipGrant()==1){ |
| | | detailsResponse.setExchangeType(4); |
| | | } |
| | | detailsResponse.setStartTime(simpleDateFormat.format(c.getStartTime())); |
| | | detailsResponse.setEndTime(simpleDateFormat.format(c.getEndTime())); |
| | | detailsResponse.setUseStatus(userCoupon.getStatus() == 1 ? 2 : 1); |
| | | detailsResponse.setGoodType(4); |
| | | responses.add(detailsResponse); |
| | | |
| | | |
| | | } |
| | | Comparator<ExchangeDetailsResponse> comparator = Comparator.comparing(ExchangeDetailsResponse::getStartTime).reversed(); |
| | | Collections.sort(responses, comparator); |