From cfa7d0a90e7da9b52606ab8fca364fa5bddddcd4 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期四, 28 八月 2025 20:14:15 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/2.0' into 2.0 --- cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupCompetitorServiceImpl.java | 24 +++++++++++++----------- 1 files changed, 13 insertions(+), 11 deletions(-) diff --git a/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupCompetitorServiceImpl.java b/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupCompetitorServiceImpl.java index 1dd31e0..6ec3abd 100644 --- a/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupCompetitorServiceImpl.java +++ b/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupCompetitorServiceImpl.java @@ -194,6 +194,7 @@ Integer winIntegral = Integer.valueOf(null == map.get("winIntegral") ? "0" : map.get("winIntegral").toString()); Integer drawIntegral = Integer.valueOf(null == map.get("drawIntegral") ? "0" : map.get("drawIntegral").toString()); Integer loseIntegral = Integer.valueOf(null == map.get("loseIntegral") ? "0" : map.get("loseIntegral").toString()); + Integer participationIntegral = Integer.valueOf(null == map.get("participationIntegral") ? "0" : map.get("participationIntegral").toString()); //学员 if(participantType == 1){ TStudent tStudent = studentClient.queryById(participantId.intValue()); @@ -209,7 +210,7 @@ } } map.put("totalSession", num); - map.put("totalIntegral", winIntegral+drawIntegral+loseIntegral); + map.put("totalIntegral", winIntegral+drawIntegral+loseIntegral+participationIntegral); map.put("winRate", "0"); for (Map<String, Object> objectMap : lists1) { Integer participantType1 = Integer.valueOf(objectMap.get("participantType").toString()); @@ -797,7 +798,7 @@ cupCompetitor.setLoseIntegral(worldCup.getLoseIntegral()); } //如果之前平了,现在赢了,需要扣减积分 - if(cupCompetitor.getMatchResult() == 0 && blue.compareTo(red) >0){ + if(cupCompetitor.getMatchResult() == 0 && blue>red){ //先扣除 SaveUserIntegralChangesVo vo1 = new SaveUserIntegralChangesVo(); vo1.setAppUserId(cupCompetitor.getAppUserId()); @@ -1045,7 +1046,8 @@ @Override public List<WorldCupCodeListVo> getWorldCupCodeListId(Integer worldCupId) { List<WorldCupCompetitor> worldCupCompetitors = this.baseMapper.selectList(new LambdaQueryWrapper<WorldCupCompetitor>().eq(WorldCupCompetitor::getWorldCupId, worldCupId) - .le(WorldCupCompetitor::getStartTime, new Date()).ge(WorldCupCompetitor::getEndTime, new Date())); + .and(w->w.isNull(WorldCupCompetitor::getEndTime).or(s->s.le(WorldCupCompetitor::getStartTime, new Date()).ge(WorldCupCompetitor::getEndTime, new Date())))) + ; List<WorldCupCodeListVo> worldCupCodeListVos = new ArrayList<>(); // worldCupCompetitors 通过code分组 @@ -1060,11 +1062,11 @@ ArrayList<UserVo> objects = new ArrayList<>(); for (WorldCupCompetitor competitor : collect1) { UserVo userVo = new UserVo(); - AppUser appUser = appUserClient.getAppUser(competitor.getAppUserId()); - userVo.setUserName(appUser.getName()); - userVo.setAvatar(appUser.getHeadImg()); + TStudent tStudent = studentClient.queryById(competitor.getParticipantId().intValue()); + userVo.setUserName(tStudent.getName()); + userVo.setAvatar(tStudent.getHeadImg()); // 当前日期和生日计算年龄 - Date birthday = appUser.getBirthday(); + Date birthday = tStudent.getBirthday(); if(birthday!=null){ int age = now.getYear() - birthday.getYear(); @@ -1078,11 +1080,11 @@ ArrayList<UserVo> objects1 = new ArrayList<>(); for (WorldCupCompetitor competitor : collect2) { UserVo userVo = new UserVo(); - AppUser appUser = appUserClient.getAppUser(competitor.getAppUserId()); - userVo.setUserName(appUser.getName()); - userVo.setAvatar(appUser.getHeadImg()); + TStudent tStudent = studentClient.queryById(competitor.getParticipantId().intValue()); + userVo.setUserName(tStudent.getName()); + userVo.setAvatar(tStudent.getHeadImg()); // 当前日期和生日计算年龄 - Date birthday = appUser.getBirthday(); + Date birthday = tStudent.getBirthday(); if(birthday!=null){ int age = now.getYear() - birthday.getYear(); -- Gitblit v1.7.1