| | |
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | |
| | | import com.yeshi.fanli.util.RedisKeyEnum;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import org.yeshi.utils.TimeUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestSerializableByKey;
|
| | | import com.yeshi.fanli.util.user.UserLevelUtil;
|
| | |
| | | * 用户队员列表查询
|
| | | *
|
| | | * @param acceptData
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getMyTeam", method = RequestMethod.POST)
|
| | |
| | | /**
|
| | | * 组织数据
|
| | | *
|
| | | * @param count
|
| | | * @param list
|
| | | * @param uid
|
| | | * @param type
|
| | |
| | | /**
|
| | | * 加工数据
|
| | | *
|
| | | * @param count
|
| | | * @param list
|
| | | * @param uid
|
| | | * @param type 查询粉丝类型 1直接 2间接
|
| | |
| | | * 用户队员统计- IOS
|
| | | *
|
| | | * @param acceptData
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "countMyTeam", method = RequestMethod.POST)
|
| | |
| | | resultData.put("firstTeamTotal", firstTeam);
|
| | | resultData.put("secondTeam", countSecond);
|
| | | resultData.put("secondTeamTotal", countSecond);
|
| | | resultData.put("helpLink", configService.get(ConfigKeyEnum.teamHelpUrl.getKey()));
|
| | | resultData.put("helpLink", configService.getValue(ConfigKeyEnum.teamHelpUrl.getKey(),acceptData.getSystem()));
|
| | |
|
| | | boolean hasTeam = true;
|
| | | if (firstTeam <= 0) {
|
| | | hasTeam = false;
|
| | | resultData.put("invitelink", configService.get(ConfigKeyEnum.inviteActivationUrl.getKey()));
|
| | | resultData.put("invitelink", configService.getValue(ConfigKeyEnum.inviteActivationUrl.getKey(),acceptData.getSystem()));
|
| | | }
|
| | | resultData.put("hasTeam", hasTeam);
|
| | |
|
| | |
| | | resultData.put("hasCode", hasCode);
|
| | | if (!hasCode) {
|
| | | List<String> tipCode = new ArrayList<String>();
|
| | | resultData.put("helpLinkActivate", configService.get(ConfigKeyEnum.teamHelpUrl.getKey()));
|
| | | resultData.put("helpLinkActivate", configService.getValue(ConfigKeyEnum.teamHelpUrl.getKey(),acceptData.getSystem()));
|
| | | tipCode.add("激活邀请功能后才可以邀请粉丝,直接粉丝是由你直接邀请,间接粉丝是由你的直接粉丝邀请。");
|
| | | tipCode.add("邀请激活功能,必须要有邀请码,邀请码可以通过金币兑换,也可以全网搜索。");
|
| | | resultData.put("tipCode", tipCode);
|
| | |
| | | /**
|
| | | * 上级信息组织
|
| | | *
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param threeSale
|
| | | * @return
|
| | |
| | | }
|
| | | bossData.put("inviteTime", "你于 " + sdf.format(inviteTime) + "接受了TA的邀请");
|
| | | } else {
|
| | | SystemEnum system= userInfoService.getUserSystem(uid);
|
| | | bossData.put("hasBoss", false);
|
| | | bossData.put("helpLink", configService.get(ConfigKeyEnum.inviteCodeHlepLink.getKey()));
|
| | | bossData.put("helpLink", configService.getValue(ConfigKeyEnum.inviteCodeHlepLink.getKey(),system));
|
| | | bossData.put("weiXinTip", "恭喜你,我们的优质用户;\r\n你并没有邀请人,但你的邀请激活功能是被默认开启的;\r\n你拥有独特的无邀请人激活码。");
|
| | | }
|
| | | return bossData;
|
| | |
| | | try {
|
| | | List<String> listIOS = new ArrayList<String>();
|
| | | List<String> listAndroid = new ArrayList<String>();
|
| | | pushService.pushZNX(remindId, title, content, listIOS, listAndroid);
|
| | | pushService.pushZNX(remindId, title, content, listIOS, listAndroid,acceptData.getSystem());
|
| | |
|
| | | userSystemMsgService.addUserSystemMsg(remindId, UserSystemMsgTypeEnum.common, title, content,
|
| | | UserSystemMsg.TIME_TAG_COMMON, null);
|
| | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("count", spreadImgService.countAll());
|
| | | data.put("inviteCode", inviteCode);
|
| | | data.put("helpLink", configService.get(ConfigKeyEnum.inviteHelpLink.getKey()));
|
| | | data.put("helpLink", configService.getValue(ConfigKeyEnum.inviteHelpLink.getKey(),acceptData.getSystem()));
|
| | | data.put("inviteRules", values.getValue().replace("\n", "<br><br>"));
|
| | | data.put("imgUrlList", JsonUtil.getSimpleGsonWithDate().toJson(imgList));
|
| | | data.put("inviteLink", Constant.YINGYONGBAO_LINK);
|
| | |
| | | *
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param inviteId
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "tailorCode")
|
| | |
| | | * 用户队员列表查询
|
| | | *
|
| | | * @param acceptData
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getMyTeamV2", method = RequestMethod.POST)
|
| | |
| | |
|
| | | // 统计H5链接
|
| | | if (page == 1) {
|
| | | result.put("link", configService.get(ConfigKeyEnum.teamStatisticsLink.getKey()));
|
| | | result.put("link", configService.getValue(ConfigKeyEnum.teamStatisticsLink.getKey(),acceptData.getSystem()));
|
| | | }
|
| | | out.print(JsonUtil.loadTrueResult(result));
|
| | | }
|
| | |
| | | * 用户队员统计
|
| | | *
|
| | | * @param acceptData
|
| | | * @param id
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "countMyTeamV2")
|
| | |
| | | int darenMonth = 0;
|
| | | int highVIPMonth = 0;
|
| | | int superVIPMonth = 0;
|
| | | Date date = new Date();
|
| | | Date minTime = TimeUtil.parseYYYYMMDD(firstday);
|
| | | Date maxTime = TimeUtil.parseYYYYMMDD_HHMMSS(lastday + " 23:59:59");
|
| | | List<TeamDailyRecord> listMonth = teamDailyRecordService.sumGroupByYearMonth(uid, minTime, maxTime);
|
| | |
| | | if (directNum > 0) {
|
| | | indirectNum = threeSaleSerivce.countSecondTeam(workerId);
|
| | | }
|
| | |
|
| | | data.put("fansNum", "直接粉丝: " + directNum + "人\n" + "间接粉丝: " + 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("fansNum", "直接粉丝: " + directNum + "人\n" + "间接粉丝: " + indirectNum + "人");
|
| | | data.put("orderInfo", "淘宝 (" + countTB + "笔)\n" + "京东 (" + countJD + "笔)\n" + "拼多多 (" + countPDD + "笔)");
|
| | | |
| | | StringBuilder builder = new StringBuilder();
|
| | | builder.append("淘宝 (" + countTB + "笔)");
|
| | | builder.append("\n京东 (" + countJD + "笔)");
|
| | | builder.append("\n拼多多 (" + countPDD + "笔)");
|
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | long countVip = commonOrderCountService.countOrderBySourceAndNearDay(workerId, Constant.SOURCE_TYPE_VIP, 60);
|
| | | long countSL = commonOrderCountService.countOrderBySourceAndNearDay(workerId, Constant.SOURCE_TYPE_SUNING, 60);
|
| | | builder.append("\n唯品会 (" + countVip + "笔)");
|
| | | builder.append("\n苏宁 (" + countSL + "笔)");
|
| | | }
|
| | | data.put("orderInfo", builder.toString());
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
| | | if (directNum > 0) {
|
| | | indirectNum = threeSaleSerivce.countSecondTeam(fansId);
|
| | | }
|
| | | data.put("fansNum", "直接粉丝: " + directNum + "人\n" + "间接粉丝: " + indirectNum + "人");
|
| | |
|
| | | // 订单统计
|
| | | long countTB = commonOrderCountService.countOrderBySourceAndNearDay(fansId, Constant.SOURCE_TYPE_TAOBAO, 60);
|
| | | long countJD = commonOrderCountService.countOrderBySourceAndNearDay(fansId, Constant.SOURCE_TYPE_JD, 60);
|
| | | long countPDD = commonOrderCountService.countOrderBySourceAndNearDay(fansId, Constant.SOURCE_TYPE_PDD, 60);
|
| | |
|
| | | data.put("fansNum", "直接粉丝: " + directNum + "人\n" + "间接粉丝: " + indirectNum + "人");
|
| | | data.put("orderInfo", "淘宝 (" + countTB + "笔)\n" + "京东 (" + countJD + "笔)\n" + "拼多多 (" + countPDD + "笔)");
|
| | | StringBuilder builder = new StringBuilder();
|
| | | builder.append("淘宝 (" + countTB + "笔)");
|
| | | builder.append("\n京东 (" + countJD + "笔)");
|
| | | builder.append("\n拼多多 (" + countPDD + "笔)");
|
| | | if (VersionUtil.greaterThan_2_1_2(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | long countVip = commonOrderCountService.countOrderBySourceAndNearDay(fansId, Constant.SOURCE_TYPE_VIP, 60);
|
| | | long countSL = commonOrderCountService.countOrderBySourceAndNearDay(fansId, Constant.SOURCE_TYPE_SUNING, 60);
|
| | | builder.append("\n唯品会 (" + countVip + "笔)");
|
| | | builder.append("\n苏宁 (" + countSL + "笔)");
|
| | | }
|
| | | data.put("orderInfo", builder.toString());
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|