提交 359a01af 编写于 作者: rushui.chen's avatar rushui.chen

20191029 登录日志记录

上级 80ae7501
流水线 #16471 已失败 于阶段
in 0 second
......@@ -82,8 +82,8 @@ public class Test {
System.out.println("--------------------登录接口-------------");
String publicKey="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCa6j3SJwXr/pLLwb6Pq8pi9StPq+Wvm6vu+LWQB1hNqClWk0jQm5GnF6Kj0ac2gqgsMsutc3hhMaaX2QZvLX+gFQHC/ufGBdBbpPtDeGWsQItsMf/xqqlkLPkc7eVTyfsmrpQM7BG9LVvaPVXPVUcZfJNBaYuR4+Sf6Zi2ayI/hQIDAQAB";
BaseRequest login = new BaseRequest();
login.setMobile("130241112588");
login.setPassword("D0DCBF0D12A6B1E7FBFA2CE5848F3EFF");
login.setMobile("13024112588");
login.setPassword("d0dcbf0d12a6b1e7fbfa2ce5848f3eff");
String con = JSONObject.toJSONString(login);
String contentResult = AESUtil.aesEncrypt(con, "YCPQPx4qpQjEjDea");
String keyResult = RSAUtil.encrypt("YCPQPx4qpQjEjDea",publicKey);
......
......@@ -48,13 +48,18 @@ public class AccountLogTask implements Runnable {
@Override
public void run() {
logger.info("记录登录日志");
if (type == AccountTypeEnum.LOG_TYPE_LOGIN.getCode()) {
loginLogMapper.insertSelective((LogLoginEntity) picaLogEntity);
} else if (type == AccountTypeEnum.LOG_TYPE_PASSWORD.getCode()) {
logPWDModifyMapper.insert((LogPWDModifyEntity) picaLogEntity);
} else if (type == AccountTypeEnum.LOG_TYPE_USER_INFO.getCode()) {
logUserInfoMapper.insertSelective((LogUserInfoEntity) picaLogEntity);
try {
logger.info("log record......");
if (type == AccountTypeEnum.LOG_TYPE_LOGIN.getCode()) {
logger.info("login record......");
loginLogMapper.insertSelective((LogLoginEntity) picaLogEntity);
} else if (type == AccountTypeEnum.LOG_TYPE_PASSWORD.getCode()) {
logPWDModifyMapper.insert((LogPWDModifyEntity) picaLogEntity);
} else if (type == AccountTypeEnum.LOG_TYPE_USER_INFO.getCode()) {
logUserInfoMapper.insertSelective((LogUserInfoEntity) picaLogEntity);
}
} catch (Exception e) {
logger.error("log record......"+e.getMessage(),e);
}
}
}
......@@ -126,10 +126,12 @@ public class LoginServiceImpl implements LoginService {
if (productType == AccountTypeEnum.PRODUCT_TYPE_DOCTOR.getCode()) {
result.setEntireFlag(doctorInfo.getEntireFlag());
}
LogLoginEntity entity = AccountLogEntityUtils.getLogLoginEntity(acctId, productType, sourceType,
AccountTypeEnum.LOGIN_PWD.getCode(), request.getLoginIp(), AccountTypeEnum.LOGIN_STATUS_SUCCESS.getCode(),
AccountTypeEnum.LOG_TYPE_LOGIN.getCode());
picaLogUtils.info(entity);
return result;
} else {
logger.info("login failure:" + mobile);
......
spring.profiles.active=uat
\ No newline at end of file
spring.profiles.active=dev
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册