|
|
@@ -29,6 +29,7 @@ import com.usoftchina.sso.dto.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Set;
|
|
|
@@ -199,10 +200,13 @@ public class AccountController {
|
|
|
*/
|
|
|
@GetMapping("/checkMobile")
|
|
|
public Result checkMobile(@RequestParam("mobile") String mobile){
|
|
|
+ Map<String, Object> map = new HashMap<String, Object>();
|
|
|
SsoCheckMobile ssoCheckMobile = ssoUserApi.checkMobile(mobile);
|
|
|
Long companyId = BaseContextHolder.getCompanyId();
|
|
|
if (ssoCheckMobile.isHasRegister()){
|
|
|
+ map.put("hasRegister", true);
|
|
|
Account account = accountService.findByMobile(mobile);
|
|
|
+ map.put("username", account.getRealname());
|
|
|
if (account != null){
|
|
|
List<CompanyBaseVO> companyBaseVOList = companyService.findBaseByAccountId(account.getId());
|
|
|
for (CompanyBaseVO companyBaseVO : companyBaseVOList){
|
|
|
@@ -211,8 +215,11 @@ public class AccountController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ }else {
|
|
|
+ map.put("hasRegister", false);
|
|
|
+ map.put("username", null);
|
|
|
}
|
|
|
- return Result.success(ssoCheckMobile);
|
|
|
+ return Result.success(map);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/checkEmail")
|