Commit a4a70370 authored by guangjing.gao's avatar guangjing.gao

异常回滚

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