| | |
| | | import com.yeshi.fanli.dao.mybatis.UserInfoMapper;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSaleExtraInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveLog;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.exception.user.ThreeSaleException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.order.config.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinOriginService;
|
| | | import com.yeshi.fanli.service.inter.user.UserActiveLogService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.invite.UserInviteMsgNotificationService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.cmq.ThreeSaleCMQManager;
|
| | |
|
| | | import net.sf.json.JSONArray;
|
| | |
| | |
|
| | | @Resource
|
| | | private MsgInviteDetailService msgInviteDetailService;
|
| | |
|
| | | @Resource
|
| | | private UserTaoLiJinOriginService userTaoLiJinOriginService;
|
| | |
|
| | | @Resource
|
| | | private UserActiveLogService userActiveLogService;
|
| | |
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | |
|
| | | UserActiveLog activeLog = userActiveLogService.getUserLatestActiveInfo(inviter.getId());
|
| | | try {
|
| | | if (activeLog != null && !StringUtil.isNullOrEmpty(activeLog.getVersionCode())) {
|
| | | String versionCode = activeLog.getVersionCode();
|
| | | String channel = activeLog.getChannel();
|
| | |
|
| | | boolean result = false;
|
| | | // 渠道是appstore 判断为IOS
|
| | | if (!StringUtil.isNullOrEmpty(channel) && "appstore".equalsIgnoreCase(channel)) {
|
| | | result = VersionUtil.greaterThan_1_5_60("ios", versionCode);
|
| | | } else {
|
| | | result = VersionUtil.greaterThan_1_5_60("android", versionCode);
|
| | | }
|
| | |
|
| | | if (result) {
|
| | | // 被邀请名称
|
| | | String inviteName = invitee.getNickName();
|
| | | if (StringUtil.isNullOrEmpty(inviteName)) {
|
| | | UserInfo userInfo = userInfoService.selectByPKey(invitee.getId());
|
| | | if (userInfo != null) {
|
| | | inviteName = userInfo.getNickName();
|
| | | }
|
| | | }
|
| | | // 奖励邀请红包(淘礼金)
|
| | | userTaoLiJinOriginService.addInviteWinMoney(inviter.getId(), inviteName);
|
| | | }
|
| | | }
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | |
|
| | | // 邀请金币
|
| | | integralGetService.addInviteLevelOne(inviter.getId(), invitee.getId());
|
| | | }
|
| | |
| | | executor.execute(new Runnable() {
|
| | | @Override
|
| | | public void run() {
|
| | | try {
|
| | | UserActiveLog activeLog = userActiveLogService.getUserLatestActiveInfo(inviterId);
|
| | | if (activeLog != null && !StringUtil.isNullOrEmpty(activeLog.getVersionCode())) {
|
| | | boolean result = false;
|
| | | String versionCode = activeLog.getVersionCode();
|
| | | String channel = activeLog.getChannel();
|
| | |
|
| | | // 渠道是appstore 判断为IOS
|
| | | if (!StringUtil.isNullOrEmpty(channel) && "appstore".equalsIgnoreCase(channel)) {
|
| | | result = VersionUtil.greaterThan_1_5_60("ios", versionCode);
|
| | | } else {
|
| | | result = VersionUtil.greaterThan_1_5_60("android", versionCode);
|
| | | }
|
| | |
|
| | | if (result) {
|
| | | // 被邀请名称
|
| | | String inviteName = invitee.getNickName();
|
| | | if (StringUtil.isNullOrEmpty(inviteName)) {
|
| | | UserInfo userInfo = userInfoService.selectByPKey(invitee.getId());
|
| | | if (userInfo != null) {
|
| | | inviteName = userInfo.getNickName();
|
| | | }
|
| | | }
|
| | | // 奖励邀请红包(淘礼金)
|
| | | userTaoLiJinOriginService.addInviteWinMoney(inviterId, inviteName);
|
| | | }
|
| | | }
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | |
|
| | | // 邀请金币
|
| | | integralGetService.addInviteLevelOne(boss.getId(), invitee.getId());
|
| | | }
|