diff --git a/src/com/engine/salary/service/auth/AuthDataServiceImpl.java b/src/com/engine/salary/service/auth/AuthDataServiceImpl.java index 582887859..2f9259b60 100644 --- a/src/com/engine/salary/service/auth/AuthDataServiceImpl.java +++ b/src/com/engine/salary/service/auth/AuthDataServiceImpl.java @@ -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 listRoleData( AuthDataQueryParam param) { List 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; }