puzhibing
2024-03-08 7501140cf637fef9629a80202907ed067c8a5a06
cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupCompetitorServiceImpl.java
@@ -65,7 +65,7 @@
            entrantRankVo.setName(participant.getName());
        }else{
            //学员
            TStudent tStudent = studentClient.queryById(entrantRank.getId());
            TStudent tStudent = studentClient.queryById(entrantRank.getId().intValue());
            entrantRankVo.setName(tStudent.getName());
        }
        //全国排名---直接数据库分组查询后排序
@@ -164,7 +164,7 @@
        for (int i = 0; i < lists.size(); i++) {
            Map<String, Object> map = lists.get(i);
            Integer participantType = Integer.valueOf(map.get("participantType").toString());
            Integer participantId = Integer.valueOf(map.get("participantId").toString());
            Long participantId = Long.valueOf(map.get("participantId").toString());
            Integer appUserId = Integer.valueOf(map.get("appUserId").toString());
            Integer totalSession = Integer.valueOf(map.get("totalSession").toString());
            Double winRate = Double.valueOf(map.get("winRate").toString());
@@ -177,7 +177,7 @@
                worldCupRankVo.setWinRate(winRate);
                //学员
                if(participantType == 1){
                    TStudent tStudent = studentClient.queryById(participantId);
                    TStudent tStudent = studentClient.queryById(participantId.intValue());
                    worldCupRankVo.setAvatar(tStudent.getHeadImg());
                    String name = tStudent.getName();
                    if(name.length() > 2){
@@ -223,7 +223,7 @@
                    worldCupRankVo.setWinRate(winRate);
                    //学员
                    if(participantType == 1){
                        TStudent tStudent = studentClient.queryById(participantId);
                        TStudent tStudent = studentClient.queryById(participantId.intValue());
                        worldCupRankVo.setAvatar(tStudent.getHeadImg());
                        String name = tStudent.getName();
                        if(name.length() > 2){
@@ -320,7 +320,7 @@
        for (int i = 0; i < mapList.size(); i++) {
            Map<String, Object> map = mapList.get(i);
            Integer participantType = Integer.valueOf(map.get("participantType").toString());
            Integer participantId = Integer.valueOf(map.get("participantId").toString());
            Long participantId = Long.valueOf(map.get("participantId").toString());
            Integer appUserId = Integer.valueOf(map.get("appUserId").toString());
            Integer totalSession = Integer.valueOf(map.get("totalSession").toString());
            Integer win = Integer.valueOf(map.get("win").toString());
@@ -329,7 +329,7 @@
            AppUser appUser = appUserClient.getAppUser(appUserId);
            map.put("province", appUser.getProvince() + appUser.getCity());
            if(1 == participantType){
                TStudent tStudent = studentClient.queryById(participantId);
                TStudent tStudent = studentClient.queryById(participantId.intValue());
                map.put("name", tStudent.getName());
                map.put("phone", tStudent.getPhone());
            }else{
@@ -365,7 +365,7 @@
        for (int i = 0; i < mapList.size(); i++) {
            Map<String, Object> map = mapList.get(i);
            Integer participantType = Integer.valueOf(map.get("participantType").toString());
            Integer participantId = Integer.valueOf(map.get("participantId").toString());
            Long participantId = Long.valueOf(map.get("participantId").toString());
            Integer appUserId = Integer.valueOf(map.get("appUserId").toString());
            Integer totalSession = Integer.valueOf(map.get("totalSession").toString());
            Integer win = Integer.valueOf(map.get("win").toString());
@@ -376,7 +376,7 @@
            AppUser appUser = appUserClient.getAppUser(appUserId);
            map.put("province", appUser.getProvince() + appUser.getCity());
            if(1 == participantType){
                TStudent tStudent = studentClient.queryById(participantId);
                TStudent tStudent = studentClient.queryById(participantId.intValue());
                if(ToolUtil.isNotEmpty(name) && tStudent.getName().indexOf(name) == -1){
                    continue;
                }
@@ -431,9 +431,9 @@
            Map<String, Object> map = new HashMap<>();
            map.put("id", cupCompetitor.getId());
            Integer participantType = cupCompetitor.getParticipantType();
            Integer participantId = cupCompetitor.getParticipantId();
            Long participantId = cupCompetitor.getParticipantId();
            if(1 == participantType){
                TStudent tStudent = studentClient.queryById(participantId);
                TStudent tStudent = studentClient.queryById(participantId.intValue());
                if(ToolUtil.isNotEmpty(name) && tStudent.getName().indexOf(name) == -1){
                    continue;
                }
@@ -535,12 +535,12 @@
        List<Map<String, Object>> mapList = new ArrayList<>();
        for (Map<String, Object> map : list) {
            Long participantType = Long.valueOf(map.get("participantType").toString());
            Integer participantId = Integer.valueOf(map.get("participantId").toString());
            Long participantId = Long.valueOf(map.get("participantId").toString());
            Integer ourScore = Integer.valueOf(map.get("ourScore").toString());
            Integer opponentScore = Integer.valueOf(map.get("opponentScore").toString());
            Integer matchResult = Integer.valueOf(map.get("matchResult").toString());
            if(1 == participantType){
                TStudent tStudent = studentClient.queryById(participantId);
                TStudent tStudent = studentClient.queryById(participantId.intValue());
                if(ToolUtil.isNotEmpty(name) && tStudent.getName().indexOf(name) == -1){
                    continue;
                }