| | |
| | | // voList.add(vo); |
| | | // }); |
| | | // } |
| | | Integer count1 =coursePackageClient.counts(stuId); |
| | | if (count1>0){ |
| | | Integer count1 = coursePackageClient.counts(stuId); |
| | | if (count1 > 0) { |
| | | GongVo vo = new GongVo(); |
| | | vo.setMedalType(1); |
| | | vo.setMedalName("俱乐部之星"); |
| | |
| | | } |
| | | |
| | | Integer count2 = participantClient.counts(stuId); |
| | | if (count2>0){ |
| | | if (count2 > 0) { |
| | | GongVo vo = new GongVo(); |
| | | vo.setMedalType(2); |
| | | vo.setMedalName("运动达人"); |
| | |
| | | } |
| | | |
| | | Integer count3 = siteClient.counts(student.getAppUserId()); |
| | | if (count3>0){ |
| | | if (count3 > 0) { |
| | | GongVo vo = new GongVo(); |
| | | vo.setMedalType(3); |
| | | vo.setMedalName("社区之王"); |
| | |
| | | |
| | | |
| | | Integer count4 = coursePackageClient.counts1(stuId); |
| | | if (count4>0){ |
| | | if (count4 > 0) { |
| | | GongVo vo = new GongVo(); |
| | | vo.setMedalType(4); |
| | | vo.setMedalName("深度玩家"); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<StuMedalVo> queryHonorDetails(Integer stuId) { |
| | | List<StuMedalVo> studentHonors = new ArrayList<>(); |
| | | // List<Integer> collect = studentHonors.stream().map(StudentHonor::getHonorRuleId).collect(Collectors.toList()); |
| | | |
| | | Integer count1 =coursePackageClient.counts(stuId); |
| | | if (count1>0){ |
| | | Integer count1 = coursePackageClient.counts(stuId); |
| | | if (count1 > 0) { |
| | | StuMedalVo vo = new StuMedalVo(); |
| | | vo.setMedalType(1); |
| | | vo.setMedalName("俱乐部之星"); |
| | |
| | | integers.add(1); |
| | | integers.add(count1); |
| | | HonorRules honorRules = honorDeClient.getHonor(integers); |
| | | if (count1<Integer.valueOf(honorRules.getCondition())){ |
| | | vo.setLevelNum(Integer.valueOf(honorRules.getLevel())-1); |
| | | if (count1 < Integer.valueOf(honorRules.getCondition())) { |
| | | vo.setLevelNum(Integer.valueOf(honorRules.getLevel()) - 1); |
| | | vo.setNextLevel(Integer.valueOf(honorRules.getLevel())); |
| | | vo.setUpgradeConditions(String.valueOf(Integer.valueOf(honorRules.getCondition())-count1)); |
| | | vo.setUpgradeConditions(String.valueOf(Integer.valueOf(honorRules.getCondition()) - count1)); |
| | | vo.setIsTopLevel(0); |
| | | }else { |
| | | } else { |
| | | vo.setIsTopLevel(1); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | Integer count2 = participantClient.counts(stuId); |
| | | if (count2>0){ |
| | | if (count2 > 0) { |
| | | StuMedalVo vo = new StuMedalVo(); |
| | | vo.setMedalType(2); |
| | | vo.setMedalName("运动达人"); |
| | |
| | | integers.add(2); |
| | | integers.add(count2); |
| | | HonorRules honorRules = honorDeClient.getHonor(integers); |
| | | if (count2<Integer.valueOf(honorRules.getCondition())){ |
| | | vo.setLevelNum(Integer.valueOf(honorRules.getLevel())-1); |
| | | if (count2 < Integer.valueOf(honorRules.getCondition())) { |
| | | vo.setLevelNum(Integer.valueOf(honorRules.getLevel()) - 1); |
| | | vo.setNextLevel(Integer.valueOf(honorRules.getLevel())); |
| | | vo.setUpgradeConditions(String.valueOf(Integer.valueOf(honorRules.getCondition())-count2)); |
| | | vo.setUpgradeConditions(String.valueOf(Integer.valueOf(honorRules.getCondition()) - count2)); |
| | | vo.setIsTopLevel(0); |
| | | }else { |
| | | } else { |
| | | vo.setIsTopLevel(1); |
| | | } |
| | | |
| | |
| | | TStudent student = studentService.getById(stuId); |
| | | |
| | | Integer count3 = siteClient.counts(student.getAppUserId()); |
| | | if (count3>0){ |
| | | if (count3 > 0) { |
| | | StuMedalVo vo = new StuMedalVo(); |
| | | vo.setMedalType(3); |
| | | vo.setMedalName("社区之王"); |
| | |
| | | integers.add(3); |
| | | integers.add(count3); |
| | | HonorRules honorRules = honorDeClient.getHonor(integers); |
| | | if (count3<Integer.valueOf(honorRules.getCondition())){ |
| | | vo.setLevelNum(Integer.valueOf(honorRules.getLevel())-1); |
| | | if (count3 < Integer.valueOf(honorRules.getCondition())) { |
| | | vo.setLevelNum(Integer.valueOf(honorRules.getLevel()) - 1); |
| | | vo.setNextLevel(Integer.valueOf(honorRules.getLevel())); |
| | | vo.setUpgradeConditions(String.valueOf(Integer.valueOf(honorRules.getCondition())-count3)); |
| | | vo.setUpgradeConditions(String.valueOf(Integer.valueOf(honorRules.getCondition()) - count3)); |
| | | vo.setIsTopLevel(0); |
| | | }else { |
| | | } else { |
| | | vo.setIsTopLevel(1); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | Integer count4 = coursePackageClient.counts1(stuId); |
| | | if (count4>0){ |
| | | if (count4 > 0) { |
| | | StuMedalVo vo = new StuMedalVo(); |
| | | vo.setMedalType(4); |
| | | vo.setMedalName("深度玩家"); |
| | |
| | | integers.add(4); |
| | | integers.add(count4); |
| | | HonorRules honorRules = honorDeClient.getHonor(integers); |
| | | if (count4<Integer.valueOf(honorRules.getCondition())){ |
| | | vo.setLevelNum(Integer.valueOf(honorRules.getLevel())-1); |
| | | if (count4 < Integer.valueOf(honorRules.getCondition())) { |
| | | vo.setLevelNum(Integer.valueOf(honorRules.getLevel()) - 1); |
| | | vo.setNextLevel(Integer.valueOf(honorRules.getLevel())); |
| | | vo.setUpgradeConditions(String.valueOf(Integer.valueOf(honorRules.getCondition())-count4)); |
| | | vo.setUpgradeConditions(String.valueOf(Integer.valueOf(honorRules.getCondition()) - count4)); |
| | | vo.setIsTopLevel(0); |
| | | }else { |
| | | } else { |
| | | vo.setIsTopLevel(1); |
| | | } |
| | | |
| | | studentHonors.add(vo); |
| | | } |
| | | |
| | | |
| | | |
| | | return studentHonors; |