| | |
| | | result.put("secondTeam", countSecond);
|
| | | result.put("count", count);
|
| | | result.put("list", array);
|
| | | |
| | | // 统计H5链接
|
| | | if (page == 1) {
|
| | | result.put("link", configService.get(ConfigKeyEnum.teamStatisticsLink.getKey()));
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(result));
|
| | | }
|
| | |
|
| | |
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "countMyTeamV2", method = RequestMethod.POST)
|
| | | public void countMyTeamV2(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | @RequestMapping(value = "countMyTeamV2")
|
| | | public void countMyTeamV2(String callback, AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | try {
|
| | | JSONObject bossObject = new JSONObject();
|
| | | ThreeSale threeSale = threeSaleSerivce.getByWorkerId(uid);
|
| | |
| | | tearcherObject.put("phone", tearcherInfo.getPhone());
|
| | | tearcherObject.put("weixin", tearcherInfo.getWxID());
|
| | | tearcherObject.put("level", UserLevelEnum.tearcher);
|
| | |
|
| | | json.put("tearcher", tearcherInfo);
|
| | | json.put("tearcher", tearcherObject);
|
| | | }
|
| | |
|
| | | JSONObject daren = new JSONObject();
|
| | |
| | | json.put("daren", daren);
|
| | | json.put("highVIP", highVIP);
|
| | | json.put("superVIP", superVIP);
|
| | | out.print(JsonUtil.loadTrueResult(json));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(json));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("统计失败"));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("统计失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | |
| | | weixin = userInfoExtra.getWeiXin();
|
| | | activeTime = userInfoExtra.getActiveTime();
|
| | | }
|
| | | |
| | | if (activeTime == null) {
|
| | | activeTime = new Date(user.getCreatetime());
|
| | | }
|
| | | |
| | | data.put("weixin", StringUtil.isNullOrEmpty(weixin) ? "" : weixin);
|
| | | data.put("loginTime", TimeUtil.formatDate(activeTime == null ? userInfoExtra.getCreateTime() : activeTime));
|
| | | data.put("loginTime", TimeUtil.formatDate(activeTime));
|
| | |
|
| | | UserExtraTaoBaoInfo userExtraTaoBaoInfo = userExtraTaoBaoInfoService.getByUid(workerId);
|
| | | if (userExtraTaoBaoInfo != null && !StringUtil.isNullOrEmpty(userExtraTaoBaoInfo.getRelationId())
|
| | |
| | | }
|
| | | data.put("level", levelName);
|
| | |
|
| | | // 粉丝统计
|
| | | long indirectNum = 0;
|
| | | long directNum = threeSaleSerivce.countFirstTeam(workerId);
|
| | | if (directNum > 0) {
|
| | | indirectNum = threeSaleSerivce.countSecondTeam(workerId);
|
| | | }
|
| | | data.put("directNum", directNum);
|
| | | data.put("indirectNum", indirectNum);
|
| | |
|
| | | // 订单统计
|
| | | long countTB = commonOrderCountService.countOrderBySourceAndNearDay(workerId, Constant.SOURCE_TYPE_TAOBAO, 60);
|
| | | long countJD = commonOrderCountService.countOrderBySourceAndNearDay(workerId, Constant.SOURCE_TYPE_JD, 60);
|
| | | long countPDD = commonOrderCountService.countOrderBySourceAndNearDay(workerId, Constant.SOURCE_TYPE_PDD, 60);
|
| | |
|
| | | data.put("orderTB", countTB);
|
| | | data.put("orderJD", countJD);
|
| | | data.put("orderPDD", countPDD);
|
| | | data.put("fansNum", "直接粉丝: "+directNum+"人\n" + "间接粉丝: "+indirectNum+"人");
|
| | | data.put("orderInfo", "淘宝 ("+countTB+"笔)\n" + "京东 ("+countJD+"笔)\n" + "拼多多 ("+countPDD+"笔)");
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "countTeamH5", method = RequestMethod.POST)
|
| | | public void countTeamH5(AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | @RequestMapping(value = "countTeamH5")
|
| | | public void countTeamH5(String callback, AcceptData acceptData, Long uid, PrintWriter out) {
|
| | | try {
|
| | | Date now = new Date();
|
| | | SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM");
|
| | |
| | | json.put("yesterday", yesterday);
|
| | | json.put("month", month);
|
| | | json.put("totality", totality);
|
| | | out.print(JsonUtil.loadTrueResult(json));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(json));
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("统计失败"));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("统计失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|