zouxuan 4 سال پیش
والد
کامیت
609c080c7b
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      edu-auth/edu-auth-server/src/main/java/com/keao/edu/auth/service/impl/SysUserServiceImpl.java

+ 3 - 2
edu-auth/edu-auth-server/src/main/java/com/keao/edu/auth/service/impl/SysUserServiceImpl.java

@@ -19,6 +19,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.core.userdetails.UsernameNotFoundException;
 import org.springframework.security.core.userdetails.UsernameNotFoundException;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
 import java.util.Date;
 import java.util.Date;
@@ -142,8 +143,8 @@ public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implem
 	}
 	}
 
 
 	@Override
 	@Override
-	@Transactional(rollbackFor = Exception.class)
-	public synchronized SysUserInfo initUser(LoginEntity loginEntity) {
+	@Transactional(rollbackFor = Exception.class,isolation = Isolation.SERIALIZABLE)
+	public SysUserInfo initUser(LoginEntity loginEntity) {
 		if(StringUtils.equalsIgnoreCase(loginEntity.getClientId(),"STUDENT")){
 		if(StringUtils.equalsIgnoreCase(loginEntity.getClientId(),"STUDENT")){
 			eduUserFeignService.studentApply(loginEntity.getOrganId(),loginEntity.getPhone());
 			eduUserFeignService.studentApply(loginEntity.getOrganId(),loginEntity.getPhone());
 			return queryUserInfoByPhone(loginEntity.getPhone(),loginEntity.getClientId());
 			return queryUserInfoByPhone(loginEntity.getPhone(),loginEntity.getClientId());