提交 c1282d4f 编写于 作者: wangxinxu's avatar wangxinxu

一键授权登录

上级 6b06c7aa
流水线 #54581 已失败 于阶段
...@@ -86,6 +86,10 @@ public class LoginController extends AccountBaseController { ...@@ -86,6 +86,10 @@ public class LoginController extends AccountBaseController {
@Autowired @Autowired
private AppletServiceClient appletServiceClient; private AppletServiceClient appletServiceClient;
@Autowired
private RegisterService registerService;
/** /**
* 密码登录接口(app、H5、web) * 密码登录接口(app、H5、web)
* *
...@@ -542,10 +546,19 @@ public class LoginController extends AccountBaseController { ...@@ -542,10 +546,19 @@ public class LoginController extends AccountBaseController {
intactUtil.sendIntact(batchNo, "login/applet", com.pica.cloud.foundation.completeness.contract.constants.CommonConstants.INTACT_CONTENT_LOG_STATUS_1, "req:" + JSON.toJSONString(req)); intactUtil.sendIntact(batchNo, "login/applet", com.pica.cloud.foundation.completeness.contract.constants.CommonConstants.INTACT_CONTENT_LOG_STATUS_1, "req:" + JSON.toJSONString(req));
Account account = accountService.getByMobilePhone(req.getMobilePhone()); //获取账号信息 Account account = accountService.getByMobilePhone(req.getMobilePhone()); //获取账号信息
if (account == null) { if (account == null) {
intactUtil.sendIntact(batchNo, "login/applet", com.pica.cloud.foundation.completeness.contract.constants.CommonConstants.INTACT_CONTENT_LOG_STATUS_3, "未注册,请验证码登录"); BaseRequest request = new BaseRequest();
return PicaResponse.toResponse(null, PicaResultCode.RESULE_DATA_NONE.code(), "本APP采用实名注册制\n如需注册请联系客服" + redisClient.get( "mobile_400_1")); request.setMobile(req.getMobilePhone());
// request.setAuthCode(authCodeReq.getAuthCode());
logger.info("login-register:{}",JSONObject.toJSONString(request));
request.setProductType(5);
request.setSourceType(9);
request.setLoginIp(super.getIpAddr());
request.setUserTokenTourist(super.getUserTokenTourist());
registerService.register(request);
account = accountService.getByMobilePhone(req.getMobilePhone()); //获取账号信息
// intactUtil.sendIntact(batchNo, "login/applet", com.pica.cloud.foundation.completeness.contract.constants.CommonConstants.INTACT_CONTENT_LOG_STATUS_3, "未注册,请验证码登录");
// return PicaResponse.toResponse(null, PicaResultCode.RESULE_DATA_NONE.code(), "本APP采用实名注册制\n如需注册请联系客服" + redisClient.get( "mobile_400_1"));
} }
//更新最后登录时间 //更新最后登录时间
Account update = new Account(); Account update = new Account();
update.setId(account.getId()); update.setId(account.getId());
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册