admin
2021-04-28 a7454d8a6325566753358b37ffabfae2faa0ca7f
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java
@@ -22,6 +22,8 @@
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;
@@ -324,7 +326,7 @@
        }
        // 不是用ID的登陆的事就多了
        BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
                acceptData.getPackages(),acceptData.getSystem());
                acceptData.getPackages(), acceptData.getSystem());
        if (system == null) {
            out.print(JsonUtil.loadFalseResult("系统不存在"));
            return;
@@ -515,7 +517,7 @@
        }
        // 不是用ID的登陆的事就多了
        BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
                acceptData.getPackages(),acceptData.getSystem());
                acceptData.getPackages(), acceptData.getSystem());
        if (system == null) {
            out.print(JsonUtil.loadFalseResult("系统不存在"));
            return;
@@ -573,7 +575,7 @@
            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) {
@@ -599,7 +601,7 @@
        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);
@@ -609,11 +611,11 @@
        }
        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;
@@ -805,10 +807,10 @@
        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 = "";
@@ -868,9 +870,9 @@
            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 = "";
@@ -1155,14 +1157,14 @@
        }
        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 + "元"));
@@ -1173,7 +1175,7 @@
            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;
@@ -1222,7 +1224,7 @@
                    }
                    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];
@@ -1710,7 +1712,7 @@
                    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 = "";
                }
@@ -1721,7 +1723,7 @@
                    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);
@@ -1782,7 +1784,7 @@
                    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 = "";
                }
@@ -1793,7 +1795,7 @@
                    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);
@@ -1838,7 +1840,7 @@
            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 = "";
            }
@@ -1855,7 +1857,7 @@
                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);
@@ -2020,11 +2022,11 @@
            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();
@@ -2050,7 +2052,7 @@
    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;
@@ -2179,7 +2181,7 @@
            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;
@@ -2237,7 +2239,7 @@
            }
            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);
@@ -2281,6 +2283,14 @@
            }
            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));