|
|
|
|
@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
|
import org.springblade.common.constant.CommonConstant; |
|
|
|
|
import org.springblade.common.constant.TenantConstant; |
|
|
|
|
import org.springblade.core.log.exception.ServiceException; |
|
|
|
|
@ -225,6 +226,15 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement |
|
|
|
|
if (StringUtil.isNotBlank(user.getName())) { |
|
|
|
|
queryWrapper.like(User::getName, user.getName()); |
|
|
|
|
} |
|
|
|
|
if(StringUtil.isNotBlank(user.getDeptId())){ |
|
|
|
|
List<Long> deptIds = new ArrayList<>(); |
|
|
|
|
List<Dept> depts = SysCache.getDeptChild(Long.parseLong(user.getDeptId())); |
|
|
|
|
if(CollectionUtils.isNotEmpty(depts)){ |
|
|
|
|
deptIds = depts.stream().map(Dept::getId).collect(Collectors.toList()); |
|
|
|
|
} |
|
|
|
|
deptIds.add(Long.parseLong(user.getDeptId())); |
|
|
|
|
queryWrapper.in(User::getDeptId,deptIds); |
|
|
|
|
} |
|
|
|
|
if (StringUtil.isNotBlank(user.getDeptName())) { |
|
|
|
|
String deptIds = SysCache.getDeptIdsByFuzzy(AuthUtil.getTenantId(), user.getDeptName()); |
|
|
|
|
if (StringUtil.isNotBlank(deptIds)) { |
|
|
|
|
|