Commit 18d12494 authored by 高广京's avatar 高广京

Merge branch 'KF-30' into 'master'

异常回滚

See merge request !25
parents 86edf76e a4a70370
...@@ -41,7 +41,7 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService { ...@@ -41,7 +41,7 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService {
private AtomicSequencer atomicSequencer; private AtomicSequencer atomicSequencer;
@Override @Override
@Transactional(propagation = Propagation.REQUIRES_NEW) @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
public void addLoginInfo(User user, Integer tenantId) { public void addLoginInfo(User user, Integer tenantId) {
log.info("=addLoginInfo -> user={}, tenetId={}", JSON.toJSONString(user), tenantId); log.info("=addLoginInfo -> user={}, tenetId={}", JSON.toJSONString(user), tenantId);
OauthClientDetailsEntity oauthClientDetailsEntity = oauthClientDetailsRepository.findFirstByClientId(tenantId); OauthClientDetailsEntity oauthClientDetailsEntity = oauthClientDetailsRepository.findFirstByClientId(tenantId);
...@@ -51,9 +51,10 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService { ...@@ -51,9 +51,10 @@ public class OauthLoginInfoServiceImpl implements IOauthLoginInfoService {
String phoneNo = user.getPhoneNo(); String phoneNo = user.getPhoneNo();
Long userId = user.getId(); Long userId = user.getId();
ProductLoginEntity productLoginEntity = productLoginRepository.findFirstByInstitutionIdAndProductIdAndPhoneNo(institutionId, productId, phoneNo); ProductLoginEntity productLoginEntity = productLoginRepository.findFirstByInstitutionIdAndProductIdAndPhoneNo(institutionId, productId, phoneNo);
log.info("=findProductLoginEntity -> {}", JSON.toJSONString(productLoginEntity));
long uuid = 0L; long uuid = 0L;
// 如果找不到该用户就创建 // 如果找不到该用户就创建
if ("".equals(productLoginEntity) || productLoginEntity == null) { if (productLoginEntity == null) {
// 添加用户到产品登录表 // 添加用户到产品登录表
long customerId = atomicSequencer.nextId(); long customerId = atomicSequencer.nextId();
// long id = session.nextId(); // long id = session.nextId();
......
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