| | |
| | | UserActiveLog activeLog = userActiveLogService.getUserLatestActiveInfo(Long.parseLong(uid));
|
| | | if (activeLog != null) {
|
| | | // 小于2.1版本不增加红包
|
| | | if (!VersionUtil.greaterThan_2_1("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | if (!VersionUtil.greaterThan_2_0_5("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | activeLog.getVersionCode()))
|
| | | return null;
|
| | | }
|
| | |
| | | @RequestMapping(value = "downAutoExtractTxt")
|
| | | public void downAutoExtractTxt(String callback, HttpServletResponse response, PrintWriter out) {
|
| | | try {
|
| | | //List<String> list = extractService.getAutoExtractOpenIds();
|
| | | List<String> list = extractService.getAutoExtractOpenIdsTo1212();
|
| | | List<String> list = extractService.getAutoExtractOpenIds();
|
| | | if (list == null || list.size() <= 1) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无用户满足自动提现条件"));
|
| | | return;
|
| | |
| | | @RequestMapping(value = "preAutoUser")
|
| | | public void preAutoUser(String callback, Integer pageIndex, PrintWriter out) {
|
| | | try {
|
| | | //List<UserInfo> list = extractService.preAutoUser();
|
| | | List<UserInfo> list = extractService.preAutoUserTo1212();
|
| | | List<UserInfo> list = extractService.preAutoUser();
|
| | | if (list == null || list.isEmpty()) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无用户满足自动提现条件"));
|
| | | return;
|
| | |
| | |
|
| | | // 新版删除
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | brandInfoRecordService.deleteRecord(Arrays.asList(ids.split(",")), uid, acceptData.getDevice());
|
| | | out.print(JsonUtil.loadTrueResult("删除成功"));
|
| | | return;
|
| | |
| | | userInfo.setWeiXinTip("添加微信号后,你的邀请人和直接粉丝可以通过微信与你建立联系。");
|
| | |
|
| | | // 查询是否为VIP
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | userInfo.setVip(userVIPInfoService.isVIP(uid));
|
| | | |
| | | boolean verifyForbid = redPackForbidService.verifyForbid(uid);
|
| | | data.put("redPackLock", verifyForbid);
|
| | | }
|
| | |
|
| | | data.put("user", JsonUtil.getConvertBigDecimalToStringBuilder(gsonBuilder).create().toJson(userInfo));
|
| | |
| | | bindPhone = bindRemindService.bindRemind(uid, BindRemind.TYPE_PHONE);
|
| | | data.put("bindPhone", bindPhone);
|
| | | }
|
| | |
|
| | | // 2.0.2 版本
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | boolean verifyForbid = redPackForbidService.verifyForbid(uid);
|
| | | data.put("redPackLock", verifyForbid);
|
| | | }
|
| | |
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(invitCode)) {
|
| | | // 2.0.6 返回邀请人
|
| | |
| | | @RequestMapping(value = "getList", method = RequestMethod.POST)
|
| | | public void getList(AcceptData acceptData, Integer page, Long cid, Long uid, PrintWriter out) {
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | getListV3(acceptData, page, cid, uid, out);
|
| | | return;
|
| | | }
|
| | |
| | | public void getShopInfoV2(AcceptData acceptData, Integer page, Long id, Long uid, PrintWriter out) {
|
| | |
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | getShopInfoV3(acceptData, page, id, uid, out);
|
| | | return;
|
| | | }
|
| | |
| | | @RequestMapping(value = "getHistoryV2", method = RequestMethod.POST)
|
| | | public void getHistoryV2(AcceptData acceptData, Integer page, Long uid, Integer type, PrintWriter out) {
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform())) {
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | getHistoryV3(acceptData, page, uid, type, out);
|
| | | return;
|
| | | }
|
| | |
| | | FloatAD floatAD = listAD.get(i);
|
| | | FloatADTypeEnum typeEnum = floatAD.getTypeEnum();
|
| | | if (typeEnum == FloatADTypeEnum.newUserRedPack
|
| | | && (!VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())
|
| | | && (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())
|
| | | || !userTaoLiJinNewbiesService.verifyHasReward(uid, acceptData.getDevice()))) {
|
| | |
|
| | | listAD.remove(i);
|
| | |
| | | list.add(menu2);
|
| | |
|
| | | // 2.0.5版本隐藏 好店栏目
|
| | | if (!VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | list.add(menu3);
|
| | | }
|
| | |
|
| | |
| | | RewardCouponVO rewardCoupon = new RewardCouponVO();
|
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
|
| | | JSONObject params1 = new JSONObject();
|
| | | if (!VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | params1.put("url", configService.get("special_guide_reward_coupon_link"));
|
| | | else
|
| | | params1.put("url", configService.get("vip_link"));
|
| | | rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | rewardCoupon.setDesc("返");
|
| | | params1.put("url", configService.get("vip_link"));
|
| | | rewardCoupon.getJumpDetail().setNeedLogin(true);
|
| | |
| | | hongBaoManageService.getFanLiRate());
|
| | | otherInfo.setFanliMoneyPlus("京东plus返¥" + fanliMoneyPlus);
|
| | | // 使用奖励券最高返
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | maxMoneyPlus = "(京东plus返¥"
|
| | | + JDUtil.getGoodsFanLiMoneyPlus(jdGoods,
|
| | | hongBaoManageService.getVIPFanLiRate())
|
| | |
| | | rewardCoupon.setMaxMoneyPlus(maxMoneyPlus);
|
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
|
| | | JSONObject params1 = new JSONObject();
|
| | | if (!VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | params1.put("url", configService.get("special_guide_reward_coupon_link"));
|
| | | else
|
| | | params1.put("url", configService.get("vip_link"));
|
| | |
|
| | | rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | rewardCoupon.setDesc("返");
|
| | | params1.put("url", configService.get("vip_link"));
|
| | | rewardCoupon.getJumpDetail().setNeedLogin(true);
|
| | |
| | | RewardCouponVO rewardCoupon = new RewardCouponVO();
|
| | | rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
|
| | | JSONObject params1 = new JSONObject();
|
| | | if (!VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | params1.put("url", configService.get("special_guide_reward_coupon_link"));
|
| | | else
|
| | | params1.put("url", configService.get("vip_link"));
|
| | |
|
| | | rewardCoupon.setMaxMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | rewardCoupon.setDesc("返");
|
| | | params1.put("url", configService.get("vip_link"));
|
| | | rewardCoupon.getJumpDetail().setNeedLogin(true);
|
| | |
| | | }
|
| | |
|
| | | boolean needVIPInfo = false;
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | needVIPInfo = true;
|
| | |
|
| | | // 组织数据
|
| | |
| | | if (page == 1) { // 第一页返回店铺信息
|
| | | String platform = acceptData.getPlatform();
|
| | | String version = acceptData.getVersion();
|
| | | if (("ios".equalsIgnoreCase(platform) && VersionUtil.greaterThan_2_1(platform, version))
|
| | | if (("ios".equalsIgnoreCase(platform) && VersionUtil.greaterThan_2_0_5(platform, version))
|
| | | || ("android".equalsIgnoreCase(platform) && VersionUtil.greaterThan_2_0_2(platform, version))) {
|
| | | BrandInfoVO brandInfoVO = null;
|
| | | try {
|
| | |
| | | package com.yeshi.fanli.controller.client.v2;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.HashSet;
|
| | | import java.util.List;
|
| | |
| | | List<Long> listStorageID = gson.fromJson(storageIds, new TypeToken<ArrayList<Long>>() {
|
| | | }.getType());
|
| | |
|
| | | if (!VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | |
|
| | | if (listStorageID == null || listStorageID.size() < 9) {
|
| | | out.print(JsonUtil.loadFalseResult("分享商品数量不足"));
|
| | |
| | | signList.add(CommonOrder.TYPE_INVITE);
|
| | |
|
| | | // 版本区分:2-0-2
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | InviteOrderSubsidy orderSubsidy = inviteOrderSubsidyService.getByOrderNoAndType(uid,
|
| | | order.getOrderNo(), sourceType);
|
| | | if (orderSubsidy != null) {
|
| | |
| | | boolean freeOrder = false;
|
| | | // 是否奖励成功
|
| | | boolean rewardSuccess = false;
|
| | | boolean version2_1 = VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion());
|
| | | boolean version2_1 = VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion());
|
| | |
|
| | | if (list != null && list.size() > 0) {
|
| | | for (UserSystemCouponRecord couponRecord : list) {
|
| | |
| | | BigDecimal shareRate = getShareRate();
|
| | | ConfigParamsDTO paramsDTO = new ConfigParamsDTO(fanLiRate, shareRate, Constant.MAX_REWARD_RATE,
|
| | | getVIPFanLiRate());
|
| | | if (VersionUtil.greaterThan_2_1(platform, version)) {
|
| | | if (VersionUtil.greaterThan_2_0_5(platform, version)) {
|
| | | paramsDTO.setMaxRewardRate(null);
|
| | | }
|
| | | return paramsDTO;
|
| | |
| | | return;
|
| | |
|
| | | // 小于2.0.5版本不增加
|
| | | if (!VersionUtil.greaterThan_2_1("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | if (!VersionUtil.greaterThan_2_0_5("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | activeLog.getVersionCode()))
|
| | | return;
|
| | |
|
| | |
| | | return;
|
| | |
|
| | | // 小于2.0.2版本不增加
|
| | | if (!VersionUtil.greaterThan_2_1("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | if (!VersionUtil.greaterThan_2_0_5("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | activeLog.getVersionCode()))
|
| | | return;
|
| | |
|
| | |
| | | throw new TokenRecordException(1, "口令已失效");
|
| | | }
|
| | | } else if (tokenType == TokenTypeEnum.redPack) {
|
| | | if(!VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | if(!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | throw new TokenRecordException(1, "请升级到最新版");
|
| | |
|
| | |
|
| | |
| | | }
|
| | | });
|
| | | } else if (tokenType == TokenTypeEnum.redPack) {
|
| | | if(!VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | if(!VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion()))
|
| | | throw new TokenRecordException(1, "请升级到最新版");
|
| | |
|
| | | try {
|
| | |
| | | private void inviteSuccess(Long bossId, Long workerId, ThreeSale threeSale) {
|
| | | // 邀请消息
|
| | | UserActiveLog activeLog = userActiveLogService.getUserLatestActiveInfo(bossId);
|
| | | if (activeLog != null && VersionUtil.greaterThan_2_1("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | if (activeLog != null && VersionUtil.greaterThan_2_0_5("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | activeLog.getVersionCode())) { // 2.1版本以上
|
| | | userInviteMsgNotificationService.inviteSuccess2_1(bossId, threeSale);
|
| | | } else { // 最初消息
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | public static boolean greaterThan_2_1(String platform, String versionCode) {
|
| | | public static boolean greaterThan_2_0_5(String platform, String versionCode) {
|
| | | if ((("android".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 52))
|
| | | || (("ios".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 73)))
|
| | | return true;
|
| | |
| | | }
|
| | |
|
| | | public static boolean greaterThan_2_0_6(String platform, String versionCode) {
|
| | | if ((("android".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 53))
|
| | | if ((("android".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 54))
|
| | | || (("ios".equalsIgnoreCase(platform) && Integer.parseInt(versionCode) >= 74)))
|
| | | return true;
|
| | | else
|