| | |
| | | if(vipPayment1.getPayStatus() != 1){ |
| | | return; |
| | | } |
| | | |
| | | /** |
| | | * SUCCESS--支付成功 |
| | | * REFUND--转入退款 |
| | |
| | | vipEndTime = new Date(); |
| | | } |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(vipEndTime); |
| | | calendar.setTime(new Date()); |
| | | calendar.set(Calendar.YEAR, calendar.get(Calendar.YEAR) + 1); |
| | | appUser.setIsVip(1); |
| | | appUser.setVipEndTime(calendar.getTime()); |
| | |
| | | vipEndTime = new Date(); |
| | | } |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(vipEndTime); |
| | | calendar.setTime(new Date()); |
| | | calendar.set(Calendar.YEAR, calendar.get(Calendar.YEAR) + 1); |
| | | appUser.setVipEndTime(calendar.getTime()); |
| | | appUserService.updateById(appUser); |
| | |
| | | if (students.size() > 0) { |
| | | userPopulation.add(3);//已有学员用户 |
| | | } |
| | | List<Coupon> list = this.list(new QueryWrapper<Coupon>().eq("distributionMethod", distributionMethod).in("userPopulation", userPopulation) |
| | | List<Coupon> list = this.list(new QueryWrapper<Coupon>().eq("distributionMethod", distributionMethod) |
| | | .in("userPopulation", userPopulation) |
| | | .eq("auditStatus", 2).eq("status", 2).eq("state", 1) |
| | | .last(" and now() between startTime and endTime order by insertTime desc")); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | |
| | | // 获取到赛事id集合 去重 |
| | | List<Integer> collect = comIds.stream().distinct().collect(Collectors.toList()); |
| | | // 根据赛事id 查询赛事支付记录 获取用户ids |
| | | List<PaymentCompetition> competitionId = paymentCompetitionService.list(new QueryWrapper<PaymentCompetition>() |
| | | .in("competitionId", collect)); |
| | | |
| | | // .stream().map(PaymentCompetition::getAppUserId).collect(Collectors.toList()); |
| | | if (collect.size() == 0){ |
| | | return new ArrayList<>(); |
| | | }else{ |
| | | List<Integer> userIds = paymentCompetitionService.list(new QueryWrapper<PaymentCompetition>() |
| | | .in("competitionId", collect)).stream() |
| | | .map(PaymentCompetition::getAppUserId).collect(Collectors.toList()); |
| | | return userIds; |
| | | } |
| | | |
| | | |
| | | return null; |
| | |
| | | // 获取当前课包的ids |
| | | List<Integer> courseIds = coursePackageService.list(new QueryWrapper<TCoursePackage>().in("storeId", storeIds)) |
| | | .stream().map(TCoursePackage::getId).collect(Collectors.toList()); |
| | | |
| | | if (courseIds.size() == 0){ |
| | | return new ArrayList<>(); |
| | | }else{ |
| | | List<Integer> userIds = tcppmenService.list(new QueryWrapper<TCoursePackagePayment>().in("coursePackageId", courseIds)) |
| | | .stream().map(TCoursePackagePayment::getAppUserId).collect(Collectors.toList()); |
| | | return userIds; |
| | | } |
| | | |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return null; |
| | |
| | | // 游戏id |
| | | List<Integer> gamesId = gameService.list(new QueryWrapper<Game>().in("storeId", storeIds)) |
| | | .stream().map(Game::getId).collect(Collectors.toList()); |
| | | if (gamesId.size() == 0){ |
| | | return new ArrayList<>(); |
| | | }else{ |
| | | // 根据游戏id获取游戏记录 获取用户Ids |
| | | List<Integer> userId = gameRecordService.list(new QueryWrapper<TGameRecord>().in("gameId", gamesId)) |
| | | .stream().map(TGameRecord::getUserId).collect(Collectors.toList()); |
| | | return userId; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | @Autowired |
| | | private IRegionService regionService; |
| | | |