修复业务线数据明细搜索bug

This commit is contained in:
Harryxzy 2025-09-18 14:15:02 +08:00
parent fd75e9fe54
commit 6ed1d5033f
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import com.engine.salary.mapper.auth.AuthRoleMapper;
import com.engine.salary.util.db.IdGenerator;
import com.engine.salary.util.db.MapperProxyFactory;
import com.google.common.collect.Lists;
import org.apache.commons.lang3.StringUtils;
import java.util.Date;
import java.util.HashSet;
@ -156,7 +157,7 @@ public class AuthDataServiceImpl extends Service implements AuthDataService {
public List<AuthRoleDataDTO> listRoleData( AuthDataQueryParam param) {
List<AuthRoleDataDTO> authRoleDataDTOS = getAuthRoleDataMapper().listRoleData(param.getRoleId());
if (StrUtil.isNotEmpty(param.getUsername())){
authRoleDataDTOS = authRoleDataDTOS.stream().filter(authRoleDataDTO -> authRoleDataDTO.getUsername().contains(param.getUsername())).collect(Collectors.toList());
authRoleDataDTOS = authRoleDataDTOS.stream().filter(authRoleDataDTO -> StringUtils.isNotBlank(authRoleDataDTO.getUsername()) && authRoleDataDTO.getUsername().contains(param.getUsername())).collect(Collectors.toList());
}
return authRoleDataDTOS;
}