| | |
| | | import com.yeshi.fanli.util.*; |
| | | import com.yeshi.fanli.util.GsonUtil; |
| | | import com.yeshi.fanli.util.StringUtil; |
| | | import com.yeshi.fanli.util.pinduoduo.PinDuoDuoApiUtil; |
| | | import com.yeshi.fanli.util.pinduoduo.PinDuoDuoUtil; |
| | | import org.apache.commons.beanutils.PropertyUtils; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | } |
| | | // 不是用ID的登陆的事就多了 |
| | | BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), |
| | | acceptData.getPackages(),acceptData.getSystem()); |
| | | acceptData.getPackages(), acceptData.getSystem()); |
| | | if (system == null) { |
| | | out.print(JsonUtil.loadFalseResult("系统不存在")); |
| | | return; |
| | |
| | | } |
| | | // 不是用ID的登陆的事就多了 |
| | | BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), |
| | | acceptData.getPackages(),acceptData.getSystem()); |
| | | acceptData.getPackages(), acceptData.getSystem()); |
| | | if (system == null) { |
| | | out.print(JsonUtil.loadFalseResult("系统不存在")); |
| | | return; |
| | |
| | | int versionCode = Integer.parseInt(version); |
| | | String platform = acceptData.getPlatform(); |
| | | |
| | | AppVersionInfo versionInfo = appVersionService.getByPlatformAndVersion(platform, "1.5.0",acceptData.getSystem()); |
| | | AppVersionInfo versionInfo = appVersionService.getByPlatformAndVersion(platform, "1.5.0", acceptData.getSystem()); |
| | | if (versionInfo != null) { |
| | | int versionCode150 = versionInfo.getVersionCode(); |
| | | if (versionCode >= versionCode150) { |
| | |
| | | |
| | | int showTiCheng = 1; // 不显示 |
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform()) |
| | | && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()),acceptData.getSystem())) |
| | | && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()), acceptData.getSystem())) |
| | | data.put("showTiCheng", false); |
| | | else { |
| | | data.put("showTiCheng", spreadImgCount + shareCount > 0); |
| | |
| | | } |
| | | |
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform()) |
| | | && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()),acceptData.getSystem())) |
| | | && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()), acceptData.getSystem())) |
| | | data.put("inviteList", String.format("http://%s/%s/client/share/friends_new_online.html", |
| | | Constant.systemCommonConfig.getProjectHost(), Constant.systemCommonConfig.getProjectName())); |
| | | else |
| | | data.put("inviteList", configService.getValue(ConfigKeyEnum.teamList.getKey(),acceptData.getSystem())); |
| | | data.put("inviteList", configService.getValue(ConfigKeyEnum.teamList.getKey(), acceptData.getSystem())); |
| | | |
| | | // 界面状态 |
| | | UserSettingsVO mySettings = null; |
| | |
| | | |
| | | data.put("error", "0"); |
| | | data.put("maxError", 1); |
| | | String minMoney = configService.getValue(EXTRACT_MIN_MONEY,acceptData.getSystem()); // 单笔提现的最小金额 |
| | | String maxMoney = configService.getValue(EXTRACT_MAX_MONEY,acceptData.getSystem()); // 单笔提现的最小金额 |
| | | String maxDayMoney = configService.getValue(ConfigKeyEnum.extractMoneyDay.getKey(),acceptData.getSystem()); // 每日最大提现金额 |
| | | int maxDayCount = Integer.parseInt(configService.getValue(ConfigKeyEnum.extractDayCount.getKey(),acceptData.getSystem())); |
| | | String minMoney = configService.getValue(EXTRACT_MIN_MONEY, acceptData.getSystem()); // 单笔提现的最小金额 |
| | | String maxMoney = configService.getValue(EXTRACT_MAX_MONEY, acceptData.getSystem()); // 单笔提现的最小金额 |
| | | String maxDayMoney = configService.getValue(ConfigKeyEnum.extractMoneyDay.getKey(), acceptData.getSystem()); // 每日最大提现金额 |
| | | int maxDayCount = Integer.parseInt(configService.getValue(ConfigKeyEnum.extractDayCount.getKey(), acceptData.getSystem())); |
| | | ExtractRecord extractRecord = extractRecordService.getExtractRecordByUid(uid); |
| | | boolean canExtract = true; |
| | | String errorMsg = ""; |
| | |
| | | return; |
| | | } |
| | | |
| | | String minMoney = configService.getValue(EXTRACT_MIN_MONEY,acceptData.getSystem()); // 单笔提现的最小金额 |
| | | String maxDayMoney = configService.getValue(ConfigKeyEnum.extractMoneyDay.getKey(),acceptData.getSystem()); // 每日最大提现金额 |
| | | int maxDayCount = Integer.parseInt(configService.getValue(ConfigKeyEnum.extractDayCount.getKey(),acceptData.getSystem())); |
| | | String minMoney = configService.getValue(EXTRACT_MIN_MONEY, acceptData.getSystem()); // 单笔提现的最小金额 |
| | | String maxDayMoney = configService.getValue(ConfigKeyEnum.extractMoneyDay.getKey(), acceptData.getSystem()); // 每日最大提现金额 |
| | | int maxDayCount = Integer.parseInt(configService.getValue(ConfigKeyEnum.extractDayCount.getKey(), acceptData.getSystem())); |
| | | ExtractRecord extractRecord = extractRecordService.getExtractRecordByUid(uid); |
| | | boolean canExtract = true; |
| | | String errorMsg = ""; |
| | |
| | | } |
| | | |
| | | BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), |
| | | acceptData.getPackages(),acceptData.getSystem()); |
| | | acceptData.getPackages(), acceptData.getSystem()); |
| | | if (system == null) { |
| | | LogHelper.userInfo("提现时,不存在该系统"); |
| | | out.print(JsonUtil.loadFalseResult("系统不存在")); |
| | | return; |
| | | } |
| | | |
| | | String minMoney = configService.getValue(EXTRACT_MIN_MONEY,acceptData.getSystem()); // 单笔提现最小金额 |
| | | String minMoney = configService.getValue(EXTRACT_MIN_MONEY, acceptData.getSystem()); // 单笔提现最小金额 |
| | | |
| | | if (money.compareTo(new BigDecimal("0.1")) < 0) { // 转帐到支付宝的最小金额 |
| | | out.print(JsonUtil.loadFalseResult("单笔提现金额需要大于:" + 0.1 + "元")); |
| | |
| | | out.print(JsonUtil.loadFalseResult("单笔提现金额需要大于:" + minMoney + "元")); |
| | | return; |
| | | } |
| | | String maxMoney = configService.getValue(EXTRACT_MAX_MONEY,acceptData.getSystem()); // 单笔提现最大金额 |
| | | String maxMoney = configService.getValue(EXTRACT_MAX_MONEY, acceptData.getSystem()); // 单笔提现最大金额 |
| | | if (new BigDecimal(maxMoney).compareTo(money) < 0) { // 后台设置的单笔转账的最大金额 |
| | | out.print(JsonUtil.loadFalseResult("单笔提现金额多为:" + maxMoney + "元")); |
| | | return; |
| | |
| | | } |
| | | |
| | | long[] targetUids = new long[]{3L, 4L, 5L}; |
| | | Config config = configService.getConfig(ConfigKeyEnum.extractCodeEmailFrom.getKey(),acceptData.getSystem()); |
| | | Config config = configService.getConfig(ConfigKeyEnum.extractCodeEmailFrom.getKey(), acceptData.getSystem()); |
| | | String[] sts = config.getValue().split(","); |
| | | String account = sts[0]; |
| | | String pwd = sts[1]; |
| | |
| | | bossData.put("inviteTime", "邀请时间: " + sdf.format(inviteTime)); |
| | | } |
| | | |
| | | String helpLink = configService.getValue(ConfigKeyEnum.teamHelpUrl.getKey(),acceptData.getSystem()); |
| | | String helpLink = configService.getValue(ConfigKeyEnum.teamHelpUrl.getKey(), acceptData.getSystem()); |
| | | if (helpLink == null) { |
| | | helpLink = ""; |
| | | } |
| | |
| | | hasCode = true; // 已有邀请码 |
| | | } else { |
| | | // 邀请激活链接 |
| | | resultData.put("activationlink", configService.getValue(ConfigKeyEnum.inviteActivationUrl.getKey(),acceptData.getSystem())); |
| | | resultData.put("activationlink", configService.getValue(ConfigKeyEnum.inviteActivationUrl.getKey(), acceptData.getSystem())); |
| | | } |
| | | resultData.put("hasCode", hasCode); |
| | | |
| | |
| | | bossData.put("inviteTime", "邀请时间: " + sdf.format(inviteTime)); |
| | | } |
| | | |
| | | String helpLink = configService.getValue(ConfigKeyEnum.teamHelpUrl.getKey(),acceptData.getSystem()); |
| | | String helpLink = configService.getValue(ConfigKeyEnum.teamHelpUrl.getKey(), acceptData.getSystem()); |
| | | if (helpLink == null) { |
| | | helpLink = ""; |
| | | } |
| | |
| | | hasCode = true; // 已有邀请码 |
| | | } else { |
| | | // 邀请激活链接 |
| | | resultData.put("activationlink", configService.getValue(ConfigKeyEnum.inviteActivationUrl.getKey(),acceptData.getSystem())); |
| | | resultData.put("activationlink", configService.getValue(ConfigKeyEnum.inviteActivationUrl.getKey(), acceptData.getSystem())); |
| | | } |
| | | resultData.put("hasCode", hasCode); |
| | | |
| | |
| | | |
| | | JSONObject resultData = new JSONObject(); |
| | | |
| | | String helpLink = configService.getValue(ConfigKeyEnum.teamHelpUrl.getKey(),acceptData.getSystem()); |
| | | String helpLink = configService.getValue(ConfigKeyEnum.teamHelpUrl.getKey(), acceptData.getSystem()); |
| | | if (helpLink == null) { |
| | | helpLink = ""; |
| | | } |
| | |
| | | hasCode = true; // 已有邀请码 |
| | | } else { |
| | | // 邀请激活链接 |
| | | resultData.put("activationlink", configService.getValue(ConfigKeyEnum.inviteActivationUrl.getKey(),acceptData.getSystem())); |
| | | resultData.put("activationlink", configService.getValue(ConfigKeyEnum.inviteActivationUrl.getKey(), acceptData.getSystem())); |
| | | } |
| | | resultData.put("hasCode", hasCode); |
| | | |
| | |
| | | if (inviteCode == null || inviteCode.trim().length() == 0) { |
| | | // 无邀请码 |
| | | inviteData.put("content", "邀请激活"); |
| | | inviteData.put("link", configService.getValue(ConfigKeyEnum.inviteActivationUrl.getKey(),acceptData.getSystem())); |
| | | inviteData.put("link", configService.getValue(ConfigKeyEnum.inviteActivationUrl.getKey(), acceptData.getSystem())); |
| | | } else { |
| | | // 已有邀请码 |
| | | inviteData.put("content", "邀请码"); |
| | | inviteData.put("link", configService.getValue(ConfigKeyEnum.inviteActivationSuccessUrl.getKey(),acceptData.getSystem())); |
| | | inviteData.put("link", configService.getValue(ConfigKeyEnum.inviteActivationSuccessUrl.getKey(), acceptData.getSystem())); |
| | | } |
| | | |
| | | JSONObject data = new JSONObject(); |
| | |
| | | public void getuserinfoNew(AcceptData acceptData, Long uid, HttpServletRequest requst, PrintWriter out) { |
| | | try { |
| | | BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), |
| | | acceptData.getPackages(),acceptData.getSystem()); |
| | | acceptData.getPackages(), acceptData.getSystem()); |
| | | if (system == null) { |
| | | out.print(JsonUtil.loadFalseResult("系统不存在")); |
| | | return; |
| | |
| | | data.put("welfareCenterNews", welfareCenterNews);// 福利中心消息 |
| | | data.put("vipLink", userVipConfigService.getValueByKey("vip_link"));// 超级会员升级链接 |
| | | |
| | | if(SystemInfoUtil.hasFunctions(acceptData.getSystem(), SystemFunction.bindPhone)) { |
| | | if (SystemInfoUtil.hasFunctions(acceptData.getSystem(), SystemFunction.bindPhone)) { |
| | | // 2.0.1之后绑定手机号 |
| | | if (VersionUtil.greaterThan_2_0_1(acceptData.getPlatform(), acceptData.getVersion())) { |
| | | boolean bindPhone = false; |
| | |
| | | } |
| | | |
| | | if (VersionUtil.greaterThan_2_1_1(acceptData.getPlatform(), acceptData.getVersion())) { |
| | | data.put("fansCountLink", configService.getValue(ConfigKeyEnum.teamStatisticsLink.getKey(),acceptData.getSystem())); |
| | | data.put("fansCountLink", configService.getValue(ConfigKeyEnum.teamStatisticsLink.getKey(), acceptData.getSystem())); |
| | | // 会员动作 |
| | | // 查询是否为超级会员,是的话返回超会管理链接 |
| | | UserLevelEnum level = userLevelManager.getUserLevel(uid); |
| | |
| | | } |
| | | |
| | | data.put("user", JsonUtil.getConvertBigDecimalToStringBuilder(gsonBuilder).create().toJson(userInfo)); |
| | | //拼多多是否绑定 |
| | | if (VersionUtil.greaterThan_2_1_5(acceptData.getPlatform(), acceptData.getVersion())) { |
| | | boolean pddBuyBind = PinDuoDuoApiUtil.isAuth(PinDuoDuoApiUtil.PID_FANLI, PinDuoDuoUtil.getCustomParams(uid)); |
| | | boolean pddShareBind = PinDuoDuoApiUtil.isAuth(PinDuoDuoApiUtil.PID_SHARE, PinDuoDuoUtil.getCustomParams(uid)); |
| | | data.put("pddBuyBind", pddBuyBind); |
| | | data.put("pddShareBind", pddShareBind); |
| | | } |
| | | |
| | | |
| | | out.print(JsonUtil.loadTrueResult(data)); |
| | | |