| | |
| | | @Override |
| | | public List<GongVo> queryStuOfMedalData(Integer stuId, Integer appUserId) { |
| | | List<GongVo> voList = new ArrayList<>(); |
| | | TStudent student = studentService.getById(stuId); |
| | | Integer count1 = coursePackageClient.counts(stuId); |
| | | if (count1 > 0) { |
| | | List<StudentHonor> list = studentHonorService.list(new QueryWrapper<StudentHonor>() |
| | | .eq("appUserId", appUserId)); |
| | | for (StudentHonor studentHonor : list) { |
| | | GongVo vo = new GongVo(); |
| | | vo.setMedalType(1); |
| | | vo.setMedalName("俱乐部之星"); |
| | | vo.setMedalType(studentHonor.getHonorType()); |
| | | switch (studentHonor.getHonorType()){ |
| | | case 1: |
| | | vo.setMedalName("俱乐部之星"); |
| | | break; |
| | | case 2: |
| | | vo.setMedalName("运动达人"); |
| | | break; |
| | | case 3: |
| | | vo.setMedalName("社区之王"); |
| | | break; |
| | | case 4: |
| | | vo.setMedalName("深度玩家"); |
| | | break; |
| | | case 5: |
| | | vo.setMedalName("常胜将军"); |
| | | break; |
| | | case 6: |
| | | vo.setMedalName("越战越勇"); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | voList.add(vo); |
| | | } |
| | | |
| | | Integer count2 = participantClient.counts(stuId); |
| | | if (count2 > 0) { |
| | | GongVo vo = new GongVo(); |
| | | vo.setMedalType(2); |
| | | vo.setMedalName("运动达人"); |
| | | voList.add(vo); |
| | | } |
| | | |
| | | Integer count3 = siteClient.counts(student.getAppUserId()); |
| | | if (count3 > 0) { |
| | | GongVo vo = new GongVo(); |
| | | vo.setMedalType(3); |
| | | vo.setMedalName("社区之王"); |
| | | voList.add(vo); |
| | | } |
| | | |
| | | |
| | | Integer count4 = coursePackageClient.counts1(stuId); |
| | | if (count4 > 0) { |
| | | GongVo vo = new GongVo(); |
| | | vo.setMedalType(4); |
| | | vo.setMedalName("深度玩家"); |
| | | voList.add(vo); |
| | | } |
| | | |
| | | Integer count5 = worldCupCompetitorClient.winCount(stuId); |
| | | |
| | | StudentHonor one = studentHonorService.getOne(new QueryWrapper<StudentHonor>() |
| | | .eq("appUserId", appUserId).eq("honorType", 5)); |
| | | if (null != one) { |
| | | GongVo vo = new GongVo(); |
| | | vo.setMedalType(5); |
| | | vo.setMedalName("常胜将军"); |
| | | voList.add(vo); |
| | | } |
| | | one = studentHonorService.getOne(new QueryWrapper<StudentHonor>() |
| | | .eq("appUserId", appUserId).eq("honorType", 6)); |
| | | if (null != one) { |
| | | GongVo vo = new GongVo(); |
| | | vo.setMedalType(6); |
| | | vo.setMedalName("越战越勇"); |
| | | voList.add(vo); |
| | | } |
| | | |
| | | return voList; |
| | | } |
| | | |