| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.ks.push.service.BDeviceTokenService; |
| | | import com.yeshi.fanli.entity.SystemEnum; |
| | | import com.yeshi.fanli.entity.SystemFunction; |
| | | import com.yeshi.fanli.exception.user.UserExtraTaoBaoInfoException; |
| | |
| | | import com.yeshi.fanli.util.*; |
| | | import com.yeshi.fanli.vo.taobao.TaoBaoUser; |
| | | import com.yeshi.fanli.vo.user.QQUserInfoVO; |
| | | import org.apache.dubbo.config.annotation.Reference; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | |
| | | @Resource |
| | | private UserExtraTaoBaoInfoService userExtraTaoBaoInfoService; |
| | | |
| | | @Reference(version = "1.0", check = false) |
| | | private BDeviceTokenService bDeviceTokenService; |
| | | |
| | | |
| | | /** |
| | | * 新版登录 V1.5.3 |
| | |
| | | case 1: { |
| | | if (!StringUtil.isNullOrEmpty(aliAccessToken)) { |
| | | long now = System.currentTimeMillis(); |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.oneKeyLoginCount,StringUtil.Md5( StringUtil.isNullOrEmpty(acceptData.getUtdid()) ? acceptData.getDevice() : acceptData.getUtdid()));; |
| | | String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.oneKeyLoginCount, StringUtil.Md5(StringUtil.isNullOrEmpty(acceptData.getUtdid()) ? acceptData.getDevice() : acceptData.getUtdid())); |
| | | ; |
| | | redisManager.increase(key); |
| | | int expire = (int) ((TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(now + 1000 * 60 * 60 * 24L, "yyyyMMdd"), "yyyyMMdd") - now) / 1000); |
| | | redisManager.expire(key, expire); |
| | |
| | | LogHelper.errorDetailInfo(e); |
| | | } |
| | | |
| | | // 绑定oppo,VIVO推送 |
| | | DeviceActive active = deviceActiveService.getFirstActiveInfo(acceptData.getDevice()); |
| | | if (active != null) { |
| | | deviceTokenOPPOService.bindUid(uuser.getId(), active.getId()); |
| | | deviceTokenVIVOService.bindUid(uuser.getId(), active.getId()); |
| | | deviceTokenXMService.bindUid(active.getId(), uuser.getId()); |
| | | if (acceptData.getSystem().isNewPush()) { |
| | | bDeviceTokenService.bindUid(acceptData.getSystem().name(), StringUtil.isNullOrEmpty(acceptData.getUtdid()) ? acceptData.getDevice() : acceptData.getUtdid(), uuser.getId() + ""); |
| | | } else { |
| | | // 绑定oppo,VIVO推送 |
| | | DeviceActive active = deviceActiveService.getFirstActiveInfo(acceptData.getDevice()); |
| | | if (active != null) { |
| | | deviceTokenOPPOService.bindUid(uuser.getId(), active.getId()); |
| | | deviceTokenVIVOService.bindUid(uuser.getId(), active.getId()); |
| | | deviceTokenXMService.bindUid(active.getId(), uuser.getId()); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | }); |
| | | } |
| | |
| | | |
| | | if (!StringUtil.isNullOrEmpty(aliAccessToken)) { |
| | | long now = System.currentTimeMillis(); |
| | | String redisKey = RedisKeyEnum.getRedisKey(RedisKeyEnum.oneKeyLoginCount,StringUtil.Md5( StringUtil.isNullOrEmpty(acceptData.getUtdid()) ? acceptData.getDevice() : acceptData.getUtdid()));; |
| | | String redisKey = RedisKeyEnum.getRedisKey(RedisKeyEnum.oneKeyLoginCount, StringUtil.Md5(StringUtil.isNullOrEmpty(acceptData.getUtdid()) ? acceptData.getDevice() : acceptData.getUtdid())); |
| | | ; |
| | | redisManager.increase(redisKey); |
| | | int expire = (int) ((TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(now + 1000 * 60 * 60 * 24L, "yyyyMMdd"), "yyyyMMdd") - now) / 1000); |
| | | redisManager.expire(redisKey, expire); |
| | |
| | | return; |
| | | } |
| | | |
| | | //升高级,防止消息队列无效,没自动申请高级 |
| | | try { |
| | | userVIPPreInfoService.upgradeVipByMyOrder(uid); |
| | | } catch (Exception e) { |
| | | } |
| | | try { |
| | | userVIPPreInfoService.upgradeVipByTeamNum(uid); |
| | | } catch (Exception e) { |
| | | } |
| | | try { |
| | | userVIPInfoService.applyVIP(uid); |
| | | } catch (UserVIPInfoException e) { |
| | |
| | | redisManager.clearSMSVCode(phone, SMSHistory.TYPE_REMVOE); |
| | | } |
| | | |
| | | userAccountService.forbiddenUserAll(uid, "用户主动注销账户"); |
| | | userAccountService.unRegisterUser(uid, "用户主动注销账户"); |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("注销成功")); |
| | | } |
| | | |