|
@@ -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());
|