| | |
| | | import com.google.gson.Gson;
|
| | | import com.yeshi.fanli.dto.mq.user.UserTopicTagEnum;
|
| | | import com.yeshi.fanli.dto.mq.user.body.UserActiveMQMsg;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveLog;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfoRegister;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoModifyRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoRegisterService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.vip.TeamUserLevelStatisticService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPPreInfoService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | | @Resource
|
| | | private UserInfoExtraService userInfoExtraService;
|
| | |
|
| | | @Resource
|
| | | private ThreeSaleSerivce threeSaleSerivce;
|
| | |
|
| | | @Override
|
| | | public Action consume(Message message, ConsumeContext context) {
|
| | |
|
| | |
| | | // 老用户同步绑定信息
|
| | | userInfoModifyRecordService.syncBeforeInfo(uid);
|
| | |
|
| | |
|
| | | // 低版本全部升级普通会员
|
| | |
|
| | | List<ThreeSale> threeSaleList = threeSaleSerivce.getMyBossDeepList(uid, 2);
|
| | | List<Long> uidList = new ArrayList<>();
|
| | | uidList.add(uid);
|
| | |
|
| | | if (threeSaleList != null) {
|
| | | for (ThreeSale ts : threeSaleList) {
|
| | | uidList.add(ts.getBoss().getId());
|
| | | }
|
| | | }
|
| | | upgradeOldUser(uidList);
|
| | | }
|
| | | }
|
| | | return Action.CommitMessage;
|
| | | }
|
| | |
|
| | | private void upgradeOldUser(List<Long> uidList) {
|
| | | for (Long uid : uidList) {
|
| | | // 同步老用户等级
|
| | | UserActiveLog log = userActiveLogService.getUserLatestActiveInfo(uid);
|
| | |
|
| | | // 低版本全部升级普通会员
|
| | | if (log != null && !VersionUtil.greaterThan_2_1(
|
| | | "appstore".equalsIgnoreCase(log.getChannel()) ? "ios" : "android", log.getVersionCode())) {
|
| | | if (log != null
|
| | | && !VersionUtil.greaterThan_2_1("appstore".equalsIgnoreCase(log.getChannel()) ? "ios" : "android",
|
| | | log.getVersionCode())) {
|
| | | UserVIPPreInfo vipInfo = userVIPPreInfoService.getLatestProcessInfo(uid);
|
| | | if (vipInfo == null) {
|
| | | vipInfo = userVIPPreInfoService.getLatestProcessInfo(uid);
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | } else if (log != null && VersionUtil.greaterThan_2_1(
|
| | | "appstore".equalsIgnoreCase(log.getChannel()) ? "ios" : "android", log.getVersionCode())) {// 2.1后升级其他等级
|
| | | // 线上老用户升级到2.1,自动计算等级
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | return Action.CommitMessage;
|
| | | }
|
| | | }
|