龙空技术网

java list模糊查询

程序帝国 66

前言:

现在大家对“java模糊查询原理”都比较注重,姐妹们都需要分析一些“java模糊查询原理”的相关文章。那么小编在网摘上网罗了一些对于“java模糊查询原理””的相关内容,希望咱们能喜欢,各位老铁们快快来学习一下吧!

在代码中根据查询条件模糊查询数据

实现方式:

ChildExtraWorkApplyFilter = childExtraWorkApplies.stream().filter(childExtraWorkApply->extraWorkFilterData(childExtraWorkApply,extraWorkApply)).collect(Collectors.toList());	private boolean extraWorkFilterData ( ChildExtraWorkApply childExtraWorkApply ,ExtraWorkApplyVO extraWorkApply){		boolean emplBln    = true;		boolean typeBln   = true;		boolean prostusBln = true;		if(StringUtils.isNotBlank(extraWorkApply.getEmployeeName())){			emplBln = extraWorkApply.getEmployeeName().contains(childExtraWorkApply.getEmployeeName());		}		if(StringUtils.isNotBlank(extraWorkApply.getExtraWorkType())){			typeBln = extraWorkApply.getExtraWorkType().contains(childExtraWorkApply.getExtraWorkType());		}		if(StringUtils.isNotBlank(extraWorkApply.getProcStatus())){			prostusBln = extraWorkApply.getProcStatus().contains(childExtraWorkApply.getProcStatus());		}		return  emplBln&&typeBln&&prostusBln;	}

标签: #java模糊查询原理