Bladeren bron

修改用户信息查询

tags/24080901
WendyYang 1 jaar geleden
bovenliggende
commit
d772478167
3 gewijzigde bestanden met toevoegingen van 16 en 6 verwijderingen
  1. +2
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/UserInfoHelperImpl.java
  2. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/user/service/IUserInfoService.java
  3. +12
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/UserInfoServiceImpl.java

+ 2
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/helper/impl/UserInfoHelperImpl.java Bestand weergeven

@@ -143,7 +143,8 @@ public class UserInfoHelperImpl implements UserInfoHelper {

@Override
public UserFullInfoDTO getUserFullInfoByEmployeeCode(String employeeCode) {
return getUserFullInfoByEmployeeCode(employeeCode);
UserInfo userInfo = userInfoService.getUserInfoByEmployeeCode(employeeCode);
return getUserFullInfo(userInfo);
}

@Override


+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/user/service/IUserInfoService.java Bestand weergeven

@@ -15,4 +15,6 @@ public interface IUserInfoService extends IService<UserInfo> {

UserInfo getUserInfoByPhoneNo(String phoneNo);

UserInfo getUserInfoByEmployeeCode(String employeeCode);

}

+ 12
- 5
pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/UserInfoServiceImpl.java Bestand weergeven

@@ -1,5 +1,6 @@
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.extension.service.impl.ServiceImpl;
import com.ningdatech.pmapi.user.entity.UserInfo;
@@ -20,16 +21,22 @@ import org.springframework.stereotype.Service;
@Service
@RequiredArgsConstructor
public class UserInfoServiceImpl extends ServiceImpl<NdUserInfoMapper, UserInfo> implements IUserInfoService {
private final NdUserInfoMapper userInfoMapper;

@Override
public UserInfo getUserInfoByPhoneNo(String phoneNo) {
if (StringUtils.isEmpty(phoneNo)) {
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);
}

}

Laden…
Annuleren
Opslaan