Administrator
2018-11-29 c18749c2f61a87b7ec17e9c859bbcbebc99b708f
安卓 队员返回一个接口
1个文件已修改
37 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/client/UserInfoController.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/UserInfoController.java
@@ -1609,6 +1609,43 @@
            resultData = threeSaleSerivce.getMySecondTeam((page - 1) * pageSize, pageSize, uid);
        } 
        
        // 安卓系统返回所有数据
        String platform = acceptData.getPlatform();
        if ("android".equalsIgnoreCase(platform)) {
            long firstTeam = threeSaleSerivce.countFirstTeam(uid, 1);
            long firstTeamTotal = threeSaleSerivce.countFirstTeam(uid, null);
            long secondTeam = threeSaleSerivce.countSecondTeam(uid, 1);
            long secondTeamTotal = threeSaleSerivce.countSecondTeam(uid, null);
            JSONObject bossData = new JSONObject();
            ThreeSale threeSale = threeSaleSerivce.getMyBoss(uid);
            if (threeSale != null) {
                UserInfo boss = threeSale.getBoss();
                if (boss != null) {
                    bossData.put("nickName", boss.getNickName());
                    bossData.put("portrait", boss.getPortrait());
                }
                SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd");
                Long createTime = threeSale.getCreateTime();
                Date inviteTime = new Date(createTime);
                bossData.put("inviteTime", "邀请时间: " + sdf.format(inviteTime));
            }
            String helpLink = configService.get("team_help_url");
            if (helpLink == null) {
                helpLink = "";
            }
            resultData.put("helpLink", helpLink);
            resultData.put("firstTeam", firstTeam);
            resultData.put("firstTeamTotal", firstTeamTotal);
            resultData.put("secondTeam", secondTeam);
            resultData.put("secondTeamTotal", secondTeamTotal);
            resultData.put("boss", bossData);
        }
        out.print(JsonUtil.loadTrueResult(resultData));
    }