|
|
@@ -46,12 +46,14 @@ public class UserAuthLoginManage { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public UserFullInfoDTO queryUserInfoInPasswordAuth(String username) { |
|
|
|
// TODO 目前账号密码登陆测试使用 强制用户登录 userId 1L |
|
|
|
UserInfo userInfo = iUserInfoService.getById(1L); |
|
|
|
if (Objects.isNull(userInfo)) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
// 返回用户全量信息 |
|
|
|
UserFullInfoDTO userFullInfoDTO = new UserFullInfoDTO(); |
|
|
|
// userFullInfoDTO.setCompanyId(1L); |
|
|
|
userFullInfoDTO.setUserId(1L); |
|
|
|
userFullInfoDTO.setIdentifier("123456"); |
|
|
|
userFullInfoDTO.setRealName("测试账号"); |
|
|
|
userFullInfoDTO.setUsername("测试账号"); |
|
|
|
userFullInfoDTOAssembler(userInfo, userFullInfoDTO); |
|
|
|
return userFullInfoDTO; |
|
|
|
} |
|
|
|
|
|
|
@@ -62,26 +64,14 @@ public class UserAuthLoginManage { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public UserFullInfoDTO queryUserInfoInPhoneNoAuth(String phoneNo) { |
|
|
|
// UserInfo userInfo = iUserInfoService.getOne(Wrappers.lambdaQuery(UserInfo.class) |
|
|
|
// .eq(UserInfo::getMobile, phoneNo)); |
|
|
|
// if (Objects.isNull(userInfo)) { |
|
|
|
// return null; |
|
|
|
// } |
|
|
|
// |
|
|
|
// UserFullInfoDTO userFullInfoDTO = new UserFullInfoDTO(); |
|
|
|
// userFullInfoDTO.setCompanyId(1L); |
|
|
|
// userFullInfoDTO.setUserId(userInfo.getId()); |
|
|
|
// userFullInfoDTO.setIdentifier(userInfo.getRealName()); |
|
|
|
// userFullInfoDTO.setRealName(userInfo.getRealName()); |
|
|
|
// userFullInfoDTO.setUsername(userInfo.getRealName()); |
|
|
|
// return userFullInfoDTO; |
|
|
|
|
|
|
|
UserInfo userInfo = iUserInfoService.getOne(Wrappers.lambdaQuery(UserInfo.class) |
|
|
|
.eq(UserInfo::getMobile, phoneNo)); |
|
|
|
if (Objects.isNull(userInfo)) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
// 返回用户全量信息 |
|
|
|
UserFullInfoDTO userFullInfoDTO = new UserFullInfoDTO(); |
|
|
|
// userFullInfoDTO.setCompanyId(1L); |
|
|
|
userFullInfoDTO.setUserId(1L); |
|
|
|
userFullInfoDTO.setIdentifier("123456"); |
|
|
|
userFullInfoDTO.setRealName("测试账号"); |
|
|
|
userFullInfoDTO.setUsername("测试账号"); |
|
|
|
userFullInfoDTOAssembler(userInfo, userFullInfoDTO); |
|
|
|
return userFullInfoDTO; |
|
|
|
} |
|
|
|
|
|
|
@@ -92,8 +82,6 @@ public class UserAuthLoginManage { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public UserFullInfoDTO queryUserInfoInAccountIdAuth(String accountId) { |
|
|
|
// 返回用户全量信息 |
|
|
|
UserFullInfoDTO userFullInfoDTO = new UserFullInfoDTO(); |
|
|
|
|
|
|
|
// 获取用户信息 |
|
|
|
UserInfo userInfo = iUserInfoService.getOne(Wrappers.lambdaQuery(UserInfo.class) |
|
|
@@ -101,7 +89,14 @@ public class UserAuthLoginManage { |
|
|
|
if (Objects.isNull(userInfo)) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
// 返回用户全量信息 |
|
|
|
UserFullInfoDTO userFullInfoDTO = new UserFullInfoDTO(); |
|
|
|
userFullInfoDTOAssembler(userInfo, userFullInfoDTO); |
|
|
|
return userFullInfoDTO; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void userFullInfoDTOAssembler(UserInfo userInfo, UserFullInfoDTO userFullInfoDTO) { |
|
|
|
// 获取浙政钉雇员信息 组织信息 |
|
|
|
String employeeCode = userInfo.getEmployeeCode(); |
|
|
|
if (StringUtils.isNotBlank(employeeCode)) { |
|
|
@@ -140,6 +135,5 @@ public class UserAuthLoginManage { |
|
|
|
userFullInfoDTO.setIdentifier(userInfo.getRealName()); |
|
|
|
userFullInfoDTO.setRealName(userInfo.getRealName()); |
|
|
|
userFullInfoDTO.setUsername(userInfo.getRealName()); |
|
|
|
return userFullInfoDTO; |
|
|
|
} |
|
|
|
} |