|  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 
|---|
|  |  |  | import com.dsh.account.dto.*; | 
|---|
|  |  |  | import com.dsh.account.entity.*; | 
|---|
|  |  |  | import com.dsh.account.feignclient.course.CoursePackageClient; | 
|---|
|  |  |  | import com.dsh.account.feignclient.course.CoursePaymentClient; | 
|---|
|  |  |  | import com.dsh.account.feignclient.course.model.TCoursePackagePayment; | 
|---|
|  |  |  | import com.dsh.account.model.QueryDataFee; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private RechargeRecordsService rechargeRecordsService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | private CoursePackageClient coursePackageClient; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加学员 | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ResponseBody | 
|---|
|  |  |  | @PostMapping("/student/stuYys") | 
|---|
|  |  |  | public HashMap<String, Object> stuYys(@RequestBody Integer id) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public HashMap<String, Object> stuYys(@RequestBody List<Integer> ids) { | 
|---|
|  |  |  | HashMap<String, Object> map = new HashMap<>(); | 
|---|
|  |  |  | // 所有的 | 
|---|
|  |  |  | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getAddUserId, id)); | 
|---|
|  |  |  | List<Integer> collect1 = list.stream().map(TAppUser::getId).collect(Collectors.toList()); | 
|---|
|  |  |  | if (collect1.size() == 0) { | 
|---|
|  |  |  | collect1.add(-1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<TStudent> students = studentService.list(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1)); | 
|---|
|  |  |  | List<TStudent> students = studentService.list(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, ids)); | 
|---|
|  |  |  | map.put("allUser", students.size()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ArrayList<Object> integers = new ArrayList<>(); | 
|---|
|  |  |  | 
|---|
|  |  |  | String s8 = maxNow.minusDays(20).toString(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime, s7, s8)); | 
|---|
|  |  |  | int count = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, ids).between(TStudent::getInsertTime, s7, s8)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count1 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime, s5, s6)); | 
|---|
|  |  |  | int count1 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, ids).between(TStudent::getInsertTime, s5, s6)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count2 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime, s3, s4)); | 
|---|
|  |  |  | int count2 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, ids).between(TStudent::getInsertTime, s3, s4)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count3 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime, s1, s2)); | 
|---|
|  |  |  | int count3 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, ids).between(TStudent::getInsertTime, s1, s2)); | 
|---|
|  |  |  | map.put("count", count); | 
|---|
|  |  |  | map.put("count1", count1); | 
|---|
|  |  |  | map.put("count2", count2); | 
|---|
|  |  |  | 
|---|
|  |  |  | for (int i = 6; i >= 0; i--) { | 
|---|
|  |  |  | String s = minNow.minusDays(i).toString(); | 
|---|
|  |  |  | String s9 = maxNow.minusDays(i).toString(); | 
|---|
|  |  |  | int count4 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime, s, s9)); | 
|---|
|  |  |  | int count4 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, ids).between(TStudent::getInsertTime, s, s9)); | 
|---|
|  |  |  | days.add(count4); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | map.put("dayData", days); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ResponseBody | 
|---|
|  |  |  | @PostMapping("/student/stuStores") | 
|---|
|  |  |  | public HashMap<String, Object> stuStores(@RequestBody Integer id) { | 
|---|
|  |  |  | public HashMap<String, Object> stuStores(@RequestBody List<Integer> ids) { | 
|---|
|  |  |  | HashMap<String, Object> map = new HashMap<>(); | 
|---|
|  |  |  | // 所有的 | 
|---|
|  |  |  | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getAddUserId, id)); | 
|---|
|  |  |  | List<Integer> collect1 = list.stream().map(TAppUser::getId).collect(Collectors.toList()); | 
|---|
|  |  |  | if (collect1.size() == 0) { | 
|---|
|  |  |  | collect1.add(-1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<TStudent> students = studentService.list(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<TStudent> students = studentService.list(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, ids)); | 
|---|
|  |  |  | map.put("allUser", students.size()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ArrayList<Object> integers = new ArrayList<>(); | 
|---|
|  |  |  | 
|---|
|  |  |  | String s8 = maxNow.minusDays(20).toString(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime, s7, s8)); | 
|---|
|  |  |  | int count = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, ids).between(TStudent::getInsertTime, s7, s8)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count1 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime, s5, s6)); | 
|---|
|  |  |  | int count1 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, ids).between(TStudent::getInsertTime, s5, s6)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count2 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime, s3, s4)); | 
|---|
|  |  |  | int count2 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, ids).between(TStudent::getInsertTime, s3, s4)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count3 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime, s1, s2)); | 
|---|
|  |  |  | int count3 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, ids).between(TStudent::getInsertTime, s1, s2)); | 
|---|
|  |  |  | map.put("count", count); | 
|---|
|  |  |  | map.put("count1", count1); | 
|---|
|  |  |  | map.put("count2", count2); | 
|---|
|  |  |  | 
|---|
|  |  |  | for (int i = 6; i >= 0; i--) { | 
|---|
|  |  |  | String s = minNow.minusDays(i).toString(); | 
|---|
|  |  |  | String s9 = maxNow.minusDays(i).toString(); | 
|---|
|  |  |  | int count4 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect1).between(TStudent::getInsertTime, s, s9)); | 
|---|
|  |  |  | int count4 = studentService.count(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, ids).between(TStudent::getInsertTime, s, s9)); | 
|---|
|  |  |  | days.add(count4); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | map.put("dayData", days); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ResponseBody | 
|---|
|  |  |  | @PostMapping("/student/userAndVipYys") | 
|---|
|  |  |  | public HashMap<String, Object> userAndVipYys(@RequestBody Integer id) { | 
|---|
|  |  |  | public HashMap<String, Object> userAndVipYys(@RequestBody List<Integer> ids) { | 
|---|
|  |  |  | HashMap<String, Object> map = new HashMap<>(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 所有的 | 
|---|
|  |  |  | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId, id)); | 
|---|
|  |  |  | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().in(TAppUser::getId, ids)); | 
|---|
|  |  |  | map.put("allUser", list.size()); | 
|---|
|  |  |  | List<TAppUser> list1 = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId, id).eq(TAppUser::getIsVip, 1)); | 
|---|
|  |  |  | List<TAppUser> list1 = appUserService.list(new LambdaQueryWrapper<TAppUser>().in(TAppUser::getId, ids).eq(TAppUser::getIsVip, 1)); | 
|---|
|  |  |  | map.put("allVip", list1.size()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | String s8 = maxNow.minusDays(20).toString(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId, id).between(TAppUser::getInsertTime, s7, s8)); | 
|---|
|  |  |  | int countVip = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId, id).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s7, s8)); | 
|---|
|  |  |  | int count = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).in(TAppUser::getId, ids).between(TAppUser::getInsertTime, s7, s8)); | 
|---|
|  |  |  | int countVip = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).in(TAppUser::getId, ids).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s7, s8)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count1 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId, id).between(TAppUser::getInsertTime, s5, s6)); | 
|---|
|  |  |  | int countVip1 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId, id).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s5, s6)); | 
|---|
|  |  |  | int count1 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).in(TAppUser::getId, ids).between(TAppUser::getInsertTime, s5, s6)); | 
|---|
|  |  |  | int countVip1 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).in(TAppUser::getId, ids).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s5, s6)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count2 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId, id).between(TAppUser::getInsertTime, s3, s4)); | 
|---|
|  |  |  | int countVip2 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId, id).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s3, s4)); | 
|---|
|  |  |  | int count2 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).in(TAppUser::getId, ids).between(TAppUser::getInsertTime, s3, s4)); | 
|---|
|  |  |  | int countVip2 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).in(TAppUser::getId, ids).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s3, s4)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count3 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId, id).between(TAppUser::getInsertTime, s1, s2)); | 
|---|
|  |  |  | int countVip3 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId, id).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s1, s2)); | 
|---|
|  |  |  | int count3 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).in(TAppUser::getId, ids).between(TAppUser::getInsertTime, s1, s2)); | 
|---|
|  |  |  | int countVip3 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).in(TAppUser::getId, ids).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s1, s2)); | 
|---|
|  |  |  | map.put("count", count); | 
|---|
|  |  |  | map.put("count1", count1); | 
|---|
|  |  |  | map.put("count2", count2); | 
|---|
|  |  |  | 
|---|
|  |  |  | for (int i = 6; i >= 0; i--) { | 
|---|
|  |  |  | String s = minNow.minusDays(i).toString(); | 
|---|
|  |  |  | String s9 = maxNow.minusDays(i).toString(); | 
|---|
|  |  |  | int count4 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId, id).between(TAppUser::getInsertTime, s, s9)); | 
|---|
|  |  |  | int countVip5 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId, id).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s, s9)); | 
|---|
|  |  |  | int count4 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).in(TAppUser::getId, ids).between(TAppUser::getInsertTime, s, s9)); | 
|---|
|  |  |  | int countVip5 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).in(TAppUser::getId, ids).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s, s9)); | 
|---|
|  |  |  | days.add(count4); | 
|---|
|  |  |  | daysVip.add(countVip5); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ResponseBody | 
|---|
|  |  |  | @PostMapping("/student/userAndVipStore") | 
|---|
|  |  |  | public HashMap<String, Object> userAndVipStore(@RequestBody Integer id) { | 
|---|
|  |  |  | public HashMap<String, Object> userAndVipStore(@RequestBody List<Integer> ids) { | 
|---|
|  |  |  | HashMap<String, Object> map = new HashMap<>(); | 
|---|
|  |  |  | // 所有的 | 
|---|
|  |  |  | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId, id)); | 
|---|
|  |  |  | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().in(TAppUser::getId, ids)); | 
|---|
|  |  |  | map.put("allUser", list.size()); | 
|---|
|  |  |  | List<TAppUser> list1 = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId, id).eq(TAppUser::getIsVip, 1)); | 
|---|
|  |  |  | List<TAppUser> list1 = appUserService.list(new LambdaQueryWrapper<TAppUser>().in(TAppUser::getId, ids).eq(TAppUser::getIsVip, 1)); | 
|---|
|  |  |  | map.put("allVip", list1.size()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | String s8 = maxNow.minusDays(20).toString(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId, id).between(TAppUser::getInsertTime, s7, s8)); | 
|---|
|  |  |  | int countVip = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId, id).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s7, s8)); | 
|---|
|  |  |  | int count = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getId, ids).between(TAppUser::getInsertTime, s7, s8)); | 
|---|
|  |  |  | int countVip = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getId, ids).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s7, s8)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count1 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId, id).between(TAppUser::getInsertTime, s5, s6)); | 
|---|
|  |  |  | int countVip1 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId, id).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s5, s6)); | 
|---|
|  |  |  | int count1 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getId, ids).between(TAppUser::getInsertTime, s5, s6)); | 
|---|
|  |  |  | int countVip1 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getId, ids).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s5, s6)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count2 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId, id).between(TAppUser::getInsertTime, s3, s4)); | 
|---|
|  |  |  | int countVip2 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId, id).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s3, s4)); | 
|---|
|  |  |  | int count2 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getId, ids).between(TAppUser::getInsertTime, s3, s4)); | 
|---|
|  |  |  | int countVip2 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getId, ids).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s3, s4)); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | int count3 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId, id).between(TAppUser::getInsertTime, s1, s2)); | 
|---|
|  |  |  | int countVip3 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId, id).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s1, s2)); | 
|---|
|  |  |  | int count3 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getId, ids).between(TAppUser::getInsertTime, s1, s2)); | 
|---|
|  |  |  | int countVip3 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getId, ids).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s1, s2)); | 
|---|
|  |  |  | map.put("count", count); | 
|---|
|  |  |  | map.put("count1", count1); | 
|---|
|  |  |  | map.put("count2", count2); | 
|---|
|  |  |  | 
|---|
|  |  |  | for (int i = 6; i >= 0; i--) { | 
|---|
|  |  |  | String s = minNow.minusDays(i).toString(); | 
|---|
|  |  |  | String s9 = maxNow.minusDays(i).toString(); | 
|---|
|  |  |  | int count4 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId, id).between(TAppUser::getInsertTime, s, s9)); | 
|---|
|  |  |  | int countVip5 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId, id).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s, s9)); | 
|---|
|  |  |  | int count4 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getId, ids).between(TAppUser::getInsertTime, s, s9)); | 
|---|
|  |  |  | int countVip5 = appUserService.count(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getId, ids).eq(TAppUser::getIsVip, 1).between(TAppUser::getInsertTime, s, s9)); | 
|---|
|  |  |  | days.add(count4); | 
|---|
|  |  |  | daysVip.add(countVip5); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping("/student/queryUserAgeYys") | 
|---|
|  |  |  | public HashMap<String, Object> queryUserAgeYys(@RequestBody Integer id) { | 
|---|
|  |  |  | public HashMap<String, Object> queryUserAgeYys(@RequestBody List<Integer> ids) { | 
|---|
|  |  |  | HashMap<String, Object> map = new HashMap<>(); | 
|---|
|  |  |  | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId, id)); | 
|---|
|  |  |  | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().in(TAppUser::getId, ids)); | 
|---|
|  |  |  | List<Integer> collect = list.stream().map(TAppUser::getId).collect(Collectors.toList()); | 
|---|
|  |  |  | if (collect.size() == 0) { | 
|---|
|  |  |  | collect.add(-1); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping("/student/queryUserAgeStore") | 
|---|
|  |  |  | public HashMap<String, Object> queryUserAgeStore(Integer id) { | 
|---|
|  |  |  | public HashMap<String, Object> queryUserAgeStore(@RequestBody List<Integer> ids) { | 
|---|
|  |  |  | HashMap<String, Object> map = new HashMap<>(); | 
|---|
|  |  |  | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId, id)); | 
|---|
|  |  |  | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().in(TAppUser::getId, ids)); | 
|---|
|  |  |  | List<Integer> collect = list.stream().map(TAppUser::getId).collect(Collectors.toList()); | 
|---|
|  |  |  | if (collect.size() == 0) { | 
|---|
|  |  |  | collect.add(-1); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping("/student/queryUserAgeYys1") | 
|---|
|  |  |  | public HashMap<String, Object> queryUserAgeYys1(@RequestBody Integer id) { | 
|---|
|  |  |  | public HashMap<String, Object> queryUserAgeYys1(@RequestBody List<Integer> ids) { | 
|---|
|  |  |  | HashMap<String, Object> map = new HashMap<>(); | 
|---|
|  |  |  | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 2).eq(TAppUser::getAddUserId, id)); | 
|---|
|  |  |  | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().in(TAppUser::getId, ids)); | 
|---|
|  |  |  | List<Integer> collect = list.stream().map(TAppUser::getId).collect(Collectors.toList()); | 
|---|
|  |  |  | if (collect.size() == 0) { | 
|---|
|  |  |  | collect.add(-1); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PostMapping("/student/queryUserAgeStore1") | 
|---|
|  |  |  | public HashMap<String, Object> queryUserAgeStore1(@RequestBody Integer id) { | 
|---|
|  |  |  | public HashMap<String, Object> queryUserAgeStore1(@RequestBody List<Integer> ids) { | 
|---|
|  |  |  | HashMap<String, Object> map = new HashMap<>(); | 
|---|
|  |  |  | List<TAppUser> list = appUserService.list(new LambdaQueryWrapper<TAppUser>().eq(TAppUser::getInsertType, 3).eq(TAppUser::getAddUserId, id)); | 
|---|
|  |  |  | List<Integer> collect = list.stream().map(TAppUser::getId).collect(Collectors.toList()); | 
|---|
|  |  |  | if (collect.size() == 0) { | 
|---|
|  |  |  | collect.add(-1); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<TStudent> list1 = studentService.list(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, collect)); | 
|---|
|  |  |  | List<TStudent> list1 = studentService.list(new LambdaQueryWrapper<TStudent>().in(TStudent::getAppUserId, ids)); | 
|---|
|  |  |  | int age1 = 0; | 
|---|
|  |  |  | int age2 = 0; | 
|---|
|  |  |  | int age3 = 0; | 
|---|
|  |  |  | 
|---|
|  |  |  | map.put("boy", boy); | 
|---|
|  |  |  | map.put("girl", girl); | 
|---|
|  |  |  | return map; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ResponseBody | 
|---|
|  |  |  | @PostMapping("/student/queryExpiredList") | 
|---|
|  |  |  | public List<TStudent> queryExpiredList(){ | 
|---|
|  |  |  | List<TStudent> list = studentService.list(new QueryWrapper<TStudent>().eq("state", 1).last(" and DATE_FORMAT(now(), '%Y-%m-%d') > validity")); | 
|---|
|  |  |  | return list; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|