admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
fanli/src/main/java/com/yeshi/fanli/util/rocketmq/consumer/user/SyncBeforeInfoMessageListener.java
@@ -80,10 +80,9 @@
         if (tag.equalsIgnoreCase(UserTopicTagEnum.userActve.name())) {
            UserActiveMQMsg msg = new Gson().fromJson(new String(message.getBody()), UserActiveMQMsg.class);
            Long uid = msg.getUid();
            // 老用户同步绑定信息
            userInfoModifyRecordService.syncBeforeInfo(uid);
            userInfoModifyRecordService.syncBeforeInfo(uid);
            // 低版本全部升级普通会员
            List<ThreeSale> threeSaleList = threeSaleSerivce.getMyBossDeepList(uid, 2);
@@ -116,15 +115,25 @@
               if (vipInfo == null) {// 没有生成高级及以上会员
                  UserInfoExtra extra = userInfoExtraService.getUserInfoExtra(uid);
                  if (extra != null && !StringUtil.isNullOrEmpty(extra.getInviteCode())) {
                     // 老用户生成普通会员
                     UserVIPPreInfo vip = new UserVIPPreInfo();
                     vip.setCreateTime(new Date());
                     vip.setProcess(UserVIPPreInfo.PROCESS_1);
                     vip.setUid(uid);
                     try {
                        userVIPPreInfoService.addUserVIPPreInfo(vip);
                     } catch (UserVIPPreInfoException e) {
                        e.printStackTrace();
                     List<Long> uids = new ArrayList<>();
                     uids.add(uid);
                     List<UserInfoRegister> list = userInfoRegisterService.listByMultipleUids(uids);
                     if (list != null && list.size() > 0)// 有注册信息
                     {
                        if (list.get(0).getCreateTime().getTime() < Constant.NEW_ORDER_FANLI_RULE_TIME) {// 增加注册时间限制
                           // 老用户生成普通会员
                           UserVIPPreInfo vip = new UserVIPPreInfo();
                           vip.setCreateTime(new Date());
                           vip.setProcess(UserVIPPreInfo.PROCESS_1);
                           vip.setUid(uid);
                           vip.setSourceType(UserVIPPreInfo.SOURCE_TYPE_ORDER);
                           try {
                              userVIPPreInfoService.addUserVIPPreInfo(vip);
                           } catch (UserVIPPreInfoException e) {
                              e.printStackTrace();
                           }
                        }
                     }
                  }
               }
@@ -153,6 +162,7 @@
                           vip.setCreateTime(new Date());
                           vip.setProcess(UserVIPPreInfo.PROCESS_1);
                           vip.setUid(uid);
                           vip.setSourceType(UserVIPPreInfo.SOURCE_TYPE_ORDER);
                           try {
                              userVIPPreInfoService.addUserVIPPreInfo(vip);
                           } catch (UserVIPPreInfoException e) {
@@ -160,7 +170,7 @@
                           }
                        }
                     }
                  } else {//之前老版本处理为普通会员的用户升级新版本
                  } else {// 之前老版本处理为普通会员的用户升级新版本
                     if (vipInfo.getProcess() == UserVIPPreInfo.PROCESS_1
                           && vipInfo.getCreateTime().getTime() < TimeUtil
                                 .convertToTimeTemp("2020-04-30 14:10:00", "yyyy-MM-dd HH:mm:ss")) {