| | |
| | | |
| | | // 代理下的准代理数量 |
| | | List<Long> userQuasiAgent = userAgentList.stream().map(AppUser::getId).collect(Collectors.toList()); |
| | | long userQuasiAgentCount = appUserService.count(new LambdaQueryWrapper<AppUser>() |
| | | .in(AppUser::getInviteUserId, userQuasiAgent) |
| | | .eq(AppUser::getVipId, 4)); |
| | | long userQuasiAgentCount = 0; |
| | | if(userQuasiAgent.size() > 0){ |
| | | userQuasiAgentCount = appUserService.count(new LambdaQueryWrapper<AppUser>() |
| | | .in(AppUser::getInviteUserId, userQuasiAgent) |
| | | .eq(AppUser::getVipId, 4)); |
| | | } |
| | | |
| | | // 判断是否满足直推代理用户数量和准代理数量 |
| | | return userAgentList.size() >= vipDirectNum && userQuasiAgentCount >= vipDirectVipNum.longValue(); |
| | |
| | | |
| | | // 获取用户直推总代理数量 |
| | | List<AppUser> userTotalAgentList = appUserService.list(new LambdaQueryWrapper<AppUser>() |
| | | .in(AppUser::getInviteUserId, shopUserIdSet) |
| | | .in(AppUser::getId, shopUserIdSet) |
| | | .eq(AppUser::getVipId, 6)); |
| | | |
| | | |
| | | // 获取用户直推代理用户数量 |
| | | List<AppUser> userAgentList = appUserService.list(new LambdaQueryWrapper<AppUser>() |
| | | .in(AppUser::getInviteUserId, shopUserIdSet) |
| | | .in(AppUser::getId, userShopList) |
| | | .eq(AppUser::getVipId, 5)); |
| | | |
| | | // 代理下的准代理数量 |
| | | List<Long> userQuasiAgent = userAgentList.stream().map(AppUser::getId).collect(Collectors.toList()); |
| | | long userQuasiAgentCount = appUserService.count(new LambdaQueryWrapper<AppUser>() |
| | | .in(AppUser::getInviteUserId, userQuasiAgent) |
| | | .eq(AppUser::getVipId, 4)); |
| | | long userQuasiAgentCount = 0; |
| | | if(userQuasiAgent.size() > 0){ |
| | | userQuasiAgentCount = appUserService.count(new LambdaQueryWrapper<AppUser>() |
| | | .in(AppUser::getInviteUserId, userQuasiAgent) |
| | | .eq(AppUser::getVipId, 4)); |
| | | } |
| | | |
| | | // 判断是否满足直推代理用户数量和准代理数量 |
| | | return userTotalAgentList.size() >= vipTeamVipNum && userAgentList.size() >= vipDirectNum && |