admin
2020-04-30 aef1627c767ef3cb697973137843617bf4b943b4
增加禁止用户等级升级名单
3个文件已修改
25 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/Constant.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/rocketmq/consumer/user/UserVIPMessageListener.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java
@@ -93,6 +93,10 @@
    public void addUserVIPPreInfo(UserVIPPreInfo info) throws UserVIPPreInfoException {
        if (info == null || info.getUid() == null || info.getProcess() == null)
            throw new UserVIPPreInfoException(1, "信息不完整");
        for (Long fuid : Constant.NO_UPGRADE_UIDS) {// 禁止不能升级的用户升级
            if (info.getUid().longValue() == fuid)
                return;
        }
        UserVIPPreInfo oldInfo = userVIPPreInfoMapper.selectByUidAndProcess(info.getUid(), info.getProcess());
        if (oldInfo != null)
@@ -223,7 +227,7 @@
        if (!StringUtil.isNullOrEmpty(first7)) {
            limitFirst7 = Long.parseLong(first7);
        }
        long limitSecond7 = 0;
        String second7 = userVipConfigService.getValueByKey("vip_pre_7_second_level_team_count");
        if (Constant.IS_TEST)
fanli/src/main/java/com/yeshi/fanli/util/Constant.java
@@ -264,6 +264,9 @@
    public static final BigDecimal REWARD_COUPON_LIMIT_MONEY = new BigDecimal("10");
    
    
    public static final Long[] NO_UPGRADE_UIDS=new Long[]{1700696L};
    
    // 线程等待数量
fanli/src/main/java/com/yeshi/fanli/util/rocketmq/consumer/user/UserVIPMessageListener.java
@@ -69,6 +69,12 @@
            if (tag.equalsIgnoreCase(UserTopicTagEnum.userLevelChanged.name())) {// 用户等级发生变化
                UserLevelChangedMQMsg msg = new Gson().fromJson(new String(message.getBody()),
                        UserLevelChangedMQMsg.class);
                for (Long fuid : Constant.NO_UPGRADE_UIDS) {// 禁止不能升级的用户升级
                    if (msg.getUid().longValue() == fuid)
                        return Action.CommitMessage;
                }
                // 更新上2级的邀请统计
                teamUserLevelStatisticService.updateUserLevel(msg.getUid());
                UserInfo boss = threeSaleSerivce.getBoss(msg.getUid());
@@ -83,6 +89,7 @@
            } else if (tag.equalsIgnoreCase(UserTopicTagEnum.threeSaleSeparate.name())) {// 邀请关系脱离
                ThreeSaleSeparateMQMsg msg = new Gson().fromJson(new String(message.getBody()),
                        ThreeSaleSeparateMQMsg.class);
                // 更新上两级邀请统计
                teamUserLevelStatisticService.initData(msg.getBossUid());
                UserInfo boss = threeSaleSerivce.getBoss(msg.getBossUid());
@@ -98,6 +105,10 @@
                OrderMoneyRecievedMQMsg dto = new Gson().fromJson(new String(message.getBody()),
                        OrderMoneyRecievedMQMsg.class);
                if (dto != null) {
                    for (Long fuid : Constant.NO_UPGRADE_UIDS) {// 禁止不能升级的用户升级
                        if (dto.getUid().longValue() == fuid)
                            return Action.CommitMessage;
                    }
                    // 判断版本
                    UserActiveLog log = userActiveLogService.getUserLatestActiveInfo(dto.getUid());
@@ -117,6 +128,11 @@
            } else if (tag.equalsIgnoreCase(OrderTopicTagEnum.orderConfirm.name())) {
                OrderConfirmMQMsg dto = new Gson().fromJson(new String(message.getBody()), OrderConfirmMQMsg.class);
                if (dto != null) {
                    for (Long fuid : Constant.NO_UPGRADE_UIDS) {// 禁止不能升级的用户升级
                        if (dto.getSourceUid().longValue() == fuid)
                            return Action.CommitMessage;
                    }
                    // 会员等级升级-粉丝数量验证
                    userVIPPreInfoService.upgradeVipByTeamNum(dto.getSourceUid());
                    userInviteValidNumService.addValidTeamNum(dto.getSourceUid(), dto.getSettleMent(),