fix:同步利元亨用户岗位数据
This commit is contained in:
@@ -297,6 +297,13 @@ public class SysUserController {
|
||||
return R.ok(sysUserService.findByUsernameList(userNames));
|
||||
}
|
||||
|
||||
@Inner(false)
|
||||
@Operation(summary = "通过用户名(工号)集合查询用户信息" , description = "通过用户名(工号)集合查询用户信息" )
|
||||
@GetMapping("/getUserListByUserNamesForSpdm")
|
||||
public R<Set<String>> getUserListByUserNamesForSpdm(@RequestParam("userNames") List<String> userNames) {
|
||||
return R.ok(sysUserService.getUserListByUserNamesForSpdm(userNames));
|
||||
}
|
||||
|
||||
@Inner
|
||||
@Operation(summary = "通过电话号码集合查询用户信息" , description = "通过电话号码集合查询用户信息" )
|
||||
@GetMapping("/retrieve/phone-list")
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.honeycombis.honeycom.user.vo.SysUserPageQueryVO;
|
||||
import com.honeycombis.honeycom.user.vo.SysUserVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author luobin@honeycombis.com
|
||||
@@ -39,6 +40,8 @@ public interface SysUserService extends IService<SysUserEntity> {
|
||||
|
||||
List<SysUserVO> findByUsernameList(List<String> usernameList);
|
||||
|
||||
Set<String> getUserListByUserNamesForSpdm(List<String> usernameList);
|
||||
|
||||
List<SysUserNoSensitiveInfoVO> findByPhoneList(List<String> phoneList);
|
||||
|
||||
List<SysUserVO> findByIds(List<Long> ids);
|
||||
|
||||
@@ -333,6 +333,23 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUserEntity
|
||||
return getSysUserVOList(result, queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getUserListByUserNamesForSpdm(List<String> usernameList) {
|
||||
if (Objects.isNull(usernameList)) {
|
||||
throw new HoneycomException(ErrorType.PARAM_ERROR.getCode());
|
||||
} else if (CollectionUtils.isEmpty(usernameList)) {
|
||||
return new HashSet<>();
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<SysUserEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.select(SysUserEntity::getUsername)
|
||||
.in(SysUserEntity::getUsername, usernameList);
|
||||
List<SysUserEntity> existing = this.list(queryWrapper);
|
||||
return existing.stream()
|
||||
.map(SysUserEntity::getUsername)
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysUserNoSensitiveInfoVO> findByPhoneList(List<String> phoneList) {
|
||||
if (CollectionUtils.isEmpty(phoneList)) {
|
||||
|
||||
Reference in New Issue
Block a user