puzhibing
2024-03-15 cf8524f0eeb0e897e31077695a410fc97633c3f5
添加方法
3个文件已修改
84 ■■■■■ 已修改文件
cloud-server-account/src/main/java/com/dsh/account/service/impl/StudentHonorServiceImpl.java 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/service/impl/StudentHonorServiceImpl.java
@@ -70,59 +70,35 @@
    @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;
    }
cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/controller/WorldCupController.java
@@ -244,16 +244,16 @@
            return ResultUtil.error("二维码不正确");
        }
        Integer space_id = jsonObject.getInteger("space_id");
        Store store = storeClient.queryStoreById(space_id);
        if(null == store){
        Site site = siteClient.getSite(space_id);
        if(null == site){
            return ResultUtil.error("无法获取场地信息");
        }
        Store store = storeClient.queryStoreById(site.getStoreId());
        String sutu_id = jsonObject.getString("sutu_id");
        TGame tGame = gameClient.getTGameBySutuId(sutu_id);
        if(null == tGame){
            return ResultUtil.error("无效的游戏二维码");
        }
        Site site = siteClient.getSite(tGame.getSiteId());
        Map<String, String> map = new HashMap<>();
        map.put("name", store.getName());
        map.put("address", site.getName());
cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java
@@ -184,7 +184,7 @@
        //2、调起开启游戏的接口。
        HashMap<String, String> map = new HashMap<>();
        map.put("sign", "0DB011836143EEE2C2E072967C9F4E4B");
        map.put("space_id", tGame.getStoreId() + "");
        map.put("space_id", tGame.getSiteId() + "");
        map.put("red_sutu_id", tGame.getRed());
        map.put("blue_sutu_id", tGame.getBlue());
        map.put("api_url", "http://221.182.45.100:56666/communityWorldCup/base/worldCup/endWorldCupCallback");