|
@@ -1,14 +1,5 @@
|
|
|
package com.ym.mec.auth.service.impl;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-
|
|
|
import com.ym.mec.auth.api.dto.SysUserInfo;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.auth.api.enums.SysUserType;
|
|
@@ -24,8 +15,16 @@ import com.ym.mec.common.exception.BizException;
|
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.im.ImFeignService;
|
|
|
import com.ym.mec.im.UserFeignService;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
@Service
|
|
|
public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implements SysUserService {
|
|
|
|
|
@@ -149,7 +148,7 @@ public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implem
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public SysUserInfo initUser(String phone, String clientId,String isRegister) {
|
|
|
if("register".equals(isRegister)){
|
|
|
- return null;
|
|
|
+ throw new UsernameNotFoundException("404.9");
|
|
|
}
|
|
|
if(autoRegister){
|
|
|
if(StringUtils.equalsIgnoreCase(clientId,"STUDENT")){
|
|
@@ -196,4 +195,4 @@ public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implem
|
|
|
throw new UsernameNotFoundException("404.9");
|
|
|
}
|
|
|
|
|
|
-}
|
|
|
+}
|