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

日志添加,发送短信..

上级 1c62c638
流水线 #22663 已失败 于阶段
in 0 second
...@@ -105,9 +105,11 @@ public class RegisterServiceImpl implements RegisterService { ...@@ -105,9 +105,11 @@ public class RegisterServiceImpl implements RegisterService {
accountInfo.setSex(0); accountInfo.setSex(0);
accountInfo.setRegisterProduct(productType); accountInfo.setRegisterProduct(productType);
accountInfo.setRegisterSource(sourceType); accountInfo.setRegisterSource(sourceType);
logger.info("register-add account");
accountInfoDetailMapper.insertSelective(accountInfo); accountInfoDetailMapper.insertSelective(accountInfo);
Integer acctId = accountInfo.getId(); Integer acctId = accountInfo.getId();
accountInfoDetailMapper.updateCreateInfo(acctId); accountInfoDetailMapper.updateCreateInfo(acctId);
logger.info("register-update account");
Account account = new Account(); Account account = new Account();
account.setAcctId(acctId); account.setAcctId(acctId);
account.setMobilePhone(mobileEncrypt); account.setMobilePhone(mobileEncrypt);
...@@ -123,7 +125,9 @@ public class RegisterServiceImpl implements RegisterService { ...@@ -123,7 +125,9 @@ public class RegisterServiceImpl implements RegisterService {
if (!StringUtils.isBlank(password)) { if (!StringUtils.isBlank(password)) {
account.setEntireFlag(3); account.setEntireFlag(3);
} }
logger.info("register-add doctor");
accountMapper.insertSelective(account); accountMapper.insertSelective(account);
logger.info("register-add doctor-finish...");
Long userId = account.getId(); Long userId = account.getId();
Account accountToken = new Account(); Account accountToken = new Account();
accountToken.setId(userId); accountToken.setId(userId);
...@@ -131,7 +135,9 @@ public class RegisterServiceImpl implements RegisterService { ...@@ -131,7 +135,9 @@ public class RegisterServiceImpl implements RegisterService {
accountToken.setCreatTime(currentTime); accountToken.setCreatTime(currentTime);
accountToken.setMobilePhone(mobile); accountToken.setMobilePhone(mobile);
accountToken.setRegisterSource(sourceType); accountToken.setRegisterSource(sourceType);
logger.info("register-generateToken-start");
String newToken = tokenUtils.generateToken(accountToken); String newToken = tokenUtils.generateToken(accountToken);
logger.info("register-generateToken-finish");
LoginResult result = new LoginResult(); LoginResult result = new LoginResult();
result.setToken(newToken); result.setToken(newToken);
result.setUserId(userId); result.setUserId(userId);
...@@ -145,22 +151,26 @@ public class RegisterServiceImpl implements RegisterService { ...@@ -145,22 +151,26 @@ public class RegisterServiceImpl implements RegisterService {
entity.setQueryMobileEntity(queryMobileEntity); entity.setQueryMobileEntity(queryMobileEntity);
} }
picaLogUtils.info(entity); picaLogUtils.info(entity);
logger.info("register-add-protocol");
processAgreement(userId); processAgreement(userId);
logger.info("register-add-roleMap");
processRoleMap(userId); processRoleMap(userId);
redisClient.del(Constants.REPEAT_REGISTER_PREFIX + mobile); redisClient.del(Constants.REPEAT_REGISTER_PREFIX + mobile);
return result; return result;
} catch (Exception e) { } catch (Exception e) {
//向上抛出异常,让异常处理框架捕获到 //向上抛出异常,让异常处理框架捕获到
logger.error(e.getMessage(),e); logger.error("register-" + e.getMessage(), e);
throw new AccountException(AccountExceptionEnum.PICA_REGISTER_FAIL); throw new AccountException(AccountExceptionEnum.PICA_REGISTER_FAIL);
} finally { } finally {
//如果在注册过程中抛出异常,就删除redis中的注册标记 //如果在注册过程中抛出异常,就删除redis中的注册标记
redisClient.del(Constants.REPEAT_REGISTER_PREFIX + mobile); redisClient.del(Constants.REPEAT_REGISTER_PREFIX + mobile);
} }
} else { } else {
logger.info("register-account is exists");
throw new AccountException(AccountExceptionEnum.PICA_ALREADY_REGISTER); throw new AccountException(AccountExceptionEnum.PICA_ALREADY_REGISTER);
} }
} else { } else {
logger.info("register-key is exists");
throw new AccountException(AccountExceptionEnum.PICA_ALREADY_REGISTER); throw new AccountException(AccountExceptionEnum.PICA_ALREADY_REGISTER);
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册