|
|
@@ -1,11 +1,15 @@ |
|
|
|
package com.ningdatech.pmapi.user.manage; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.ningdatech.pmapi.user.entity.UserInfo; |
|
|
|
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; |
|
|
|
import com.ningdatech.pmapi.user.service.IUserAuthService; |
|
|
|
import com.ningdatech.pmapi.user.service.IUserInfoService; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
/** |
|
|
|
* @author liuxinxin |
|
|
|
* @date 2023/1/3 上午10:57 |
|
|
@@ -41,12 +45,18 @@ 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(1L); |
|
|
|
userFullInfoDTO.setIdentifier("123456"); |
|
|
|
userFullInfoDTO.setRealName("测试账号"); |
|
|
|
userFullInfoDTO.setUsername("测试账号"); |
|
|
|
userFullInfoDTO.setUserId(userInfo.getId()); |
|
|
|
userFullInfoDTO.setIdentifier(userInfo.getRealName()); |
|
|
|
userFullInfoDTO.setRealName(userInfo.getRealName()); |
|
|
|
userFullInfoDTO.setUsername(userInfo.getRealName()); |
|
|
|
return userFullInfoDTO; |
|
|
|
} |
|
|
|
|
|
|
@@ -57,12 +67,17 @@ public class UserAuthLoginManage { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public UserFullInfoDTO queryUserInfoInAccountIdAuth(String accountId) { |
|
|
|
UserInfo userInfo = iUserInfoService.getOne(Wrappers.lambdaQuery(UserInfo.class) |
|
|
|
.eq(UserInfo::getAccountId, accountId)); |
|
|
|
if (Objects.isNull(userInfo)) { |
|
|
|
return null; |
|
|
|
} |
|
|
|
UserFullInfoDTO userFullInfoDTO = new UserFullInfoDTO(); |
|
|
|
userFullInfoDTO.setCompanyId(1L); |
|
|
|
userFullInfoDTO.setUserId(1L); |
|
|
|
userFullInfoDTO.setIdentifier("123456"); |
|
|
|
userFullInfoDTO.setRealName("测试账号"); |
|
|
|
userFullInfoDTO.setUsername("测试账号"); |
|
|
|
userFullInfoDTO.setUserId(userInfo.getId()); |
|
|
|
userFullInfoDTO.setIdentifier(userInfo.getRealName()); |
|
|
|
userFullInfoDTO.setRealName(userInfo.getRealName()); |
|
|
|
userFullInfoDTO.setUsername(userInfo.getRealName()); |
|
|
|
return userFullInfoDTO; |
|
|
|
} |
|
|
|
} |