Commit 2c15115c authored by gaoguangjing's avatar gaoguangjing

基本登录-快速登录

parent d726ca92
......@@ -80,7 +80,7 @@ public interface IUserService {
JsonResult loginFast(Long channelId, String appChannel, Long createdFrom, Long btRegisterChannelId,
String dimension, String clickId, HttpServletRequest request, Merchant merchant,
String phoneNo);
String phoneNo, String tenantId);
/**
* 查询用户全量信息
......
......@@ -26,11 +26,7 @@ import cn.quantgroup.xyqb.service.register.IUserRegisterService;
import cn.quantgroup.xyqb.service.session.ISessionService;
import cn.quantgroup.xyqb.service.user.*;
import cn.quantgroup.xyqb.service.wechat.IWechatService;
import cn.quantgroup.xyqb.util.HashUtil;
import cn.quantgroup.xyqb.util.IpUtil;
import cn.quantgroup.xyqb.util.MqUtils;
import cn.quantgroup.xyqb.util.PasswordUtil;
import cn.quantgroup.xyqb.util.ValidationUtil;
import cn.quantgroup.xyqb.util.*;
import com.alibaba.fastjson.JSON;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
......@@ -97,6 +93,9 @@ public class UserServiceImpl implements IUserService, IBaseController {
@Resource
private ILockIpv4Service lockIpv4Service;
@Autowired
private IOauthLoginInfoService oauthLoginInfoService;
@Override
// @Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager")
public User findByPhoneInDb(String phone) {
......@@ -335,7 +334,7 @@ public class UserServiceImpl implements IUserService, IBaseController {
@Override
@RedisLock(prefix = "lock:login:fast:", key = "#this[8]")
public JsonResult loginFast(Long channelId, String appChannel, Long createdFrom, Long btRegisterChannelId,
String dimension, String clickId, HttpServletRequest request, Merchant merchant, String phoneNo) {
String dimension, String clickId, HttpServletRequest request, Merchant merchant, String phoneNo, String tenantId) {
Boolean register = false;
User user = findByPhoneWithCache(phoneNo);
if (user != null && !user.getEnable()) {
......@@ -390,6 +389,9 @@ public class UserServiceImpl implements IUserService, IBaseController {
} catch (Exception e) {
log.info("神策埋点出现问题", e);
}
if (!TenantUtil.TENANT_DEFAULT.equals(tenantId)) {
oauthLoginInfoService.addLoginInfo(user, tenantId);
}
LoginProperties loginProperties = new LoginProperties("", 3, channelId, createdFrom, appChannel, merchant.getId(), merchant.getName(), null);
AuthBean session = sessionService.createSession(user, loginProperties);
session.setRegister(register);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment