提交 e3f78b0f 编写于 作者: Chongwen.jiang's avatar Chongwen.jiang

苹果授权登录记录日志

上级 08b1f7ce
流水线 #22648 已失败 于阶段
in 1 second
...@@ -220,6 +220,7 @@ public class LoginController extends AccountBaseController { ...@@ -220,6 +220,7 @@ public class LoginController extends AccountBaseController {
BaseRequest request = CryptoUtil.decrypt(entity, BaseRequest.class); BaseRequest request = CryptoUtil.decrypt(entity, BaseRequest.class);
request.setProductType(super.getProductType()); request.setProductType(super.getProductType());
request.setSourceType(super.getSourceType()); request.setSourceType(super.getSourceType());
request.setLoginIp(super.getIpAddr());
return PicaResponse.toResponse(loginService.loginByApple(request)); return PicaResponse.toResponse(loginService.loginByApple(request));
} }
......
...@@ -303,7 +303,7 @@ public class LoginServiceImpl implements LoginService { ...@@ -303,7 +303,7 @@ public class LoginServiceImpl implements LoginService {
WeChatEntity weChatEntity = null; WeChatEntity weChatEntity = null;
if (null != request.getBizType() && if (null != request.getBizType() &&
request.getBizType().equals(1)) { request.getBizType().equals(1)) {
// h5微信登录 // h5微信登录 TODO 下次单独拆分出去一个新接口
weChatEntity = WeChatUtils.getAuthorizationInfo(appIdH5, appSecretH5, request.getWeChatCode()); weChatEntity = WeChatUtils.getAuthorizationInfo(appIdH5, appSecretH5, request.getWeChatCode());
} else { } else {
// 原生微信登录 // 原生微信登录
...@@ -640,6 +640,16 @@ public class LoginServiceImpl implements LoginService { ...@@ -640,6 +640,16 @@ public class LoginServiceImpl implements LoginService {
result.setEntireFlag(doctor.getEntire_flag()); result.setEntireFlag(doctor.getEntire_flag());
result.setMobile(AESUtil.decryptV0(doctor.getMobile_phone())); result.setMobile(AESUtil.decryptV0(doctor.getMobile_phone()));
} }
//记录登录日志
LogLoginEntity entity = AccountLogEntityUtils.getLogLoginEntity(
Integer.valueOf(String.valueOf(acctId)),
request.getProductType(), request.getSourceType(),
AccountTypeEnum.LOGIN_APPLE.getCode(),
request.getLoginIp(),
AccountTypeEnum.LOGIN_STATUS_SUCCESS.getCode(),
AccountTypeEnum.LOG_TYPE_LOGIN.getCode());
picaLogUtils.info(entity);
long end1 = System.currentTimeMillis(); long end1 = System.currentTimeMillis();
logger.info("loginByApple1-duration {} millionSeconds", (end1-start)); logger.info("loginByApple1-duration {} millionSeconds", (end1-start));
return result; return result;
...@@ -790,7 +800,6 @@ public class LoginServiceImpl implements LoginService { ...@@ -790,7 +800,6 @@ public class LoginServiceImpl implements LoginService {
AccountInfoEntity accountInfoDb = accountInfoDetailMapper.selectByMobile(AESUtil.encryptV0(request.getMobile())); AccountInfoEntity accountInfoDb = accountInfoDetailMapper.selectByMobile(AESUtil.encryptV0(request.getMobile()));
logger.info("loginByAppleStep-account is null {}, request:{}", accountInfoDb == null, JSON.toJSONString(request)); logger.info("loginByAppleStep-account is null {}, request:{}", accountInfoDb == null, JSON.toJSONString(request));
LoginResult result; LoginResult result;
accountInfoDb= null;
if (accountInfoDb == null) { if (accountInfoDb == null) {
// 验证码校验 // 验证码校验
accountUtils.checkRegisterMobilePhoneAndAuthCode( accountUtils.checkRegisterMobilePhoneAndAuthCode(
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册