|
@@ -1,5 +1,6 @@ |
|
|
package com.ningdatech.pmapi.user.service.impl; |
|
|
package com.ningdatech.pmapi.user.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
import com.ningdatech.pmapi.user.entity.UserInfo; |
|
|
import com.ningdatech.pmapi.user.entity.UserInfo; |
|
@@ -20,16 +21,22 @@ import org.springframework.stereotype.Service; |
|
|
@Service |
|
|
@Service |
|
|
@RequiredArgsConstructor |
|
|
@RequiredArgsConstructor |
|
|
public class UserInfoServiceImpl extends ServiceImpl<NdUserInfoMapper, UserInfo> implements IUserInfoService { |
|
|
public class UserInfoServiceImpl extends ServiceImpl<NdUserInfoMapper, UserInfo> implements IUserInfoService { |
|
|
private final NdUserInfoMapper userInfoMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public UserInfo getUserInfoByPhoneNo(String phoneNo) { |
|
|
public UserInfo getUserInfoByPhoneNo(String phoneNo) { |
|
|
if (StringUtils.isEmpty(phoneNo)) { |
|
|
if (StringUtils.isEmpty(phoneNo)) { |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
UserInfo userInfo = userInfoMapper |
|
|
|
|
|
.selectOne(Wrappers.lambdaQuery(UserInfo.class) |
|
|
|
|
|
.eq(UserInfo::getMobile, phoneNo)); |
|
|
|
|
|
return userInfo; |
|
|
|
|
|
|
|
|
LambdaQueryWrapper<UserInfo> query = Wrappers.lambdaQuery(UserInfo.class) |
|
|
|
|
|
.eq(UserInfo::getMobile, phoneNo); |
|
|
|
|
|
return getOne(query); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public UserInfo getUserInfoByEmployeeCode(String employeeCode) { |
|
|
|
|
|
LambdaQueryWrapper<UserInfo> query = Wrappers.lambdaQuery(UserInfo.class) |
|
|
|
|
|
.eq(UserInfo::getEmployeeCode, employeeCode); |
|
|
|
|
|
return getOne(query); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |