自定义条件就要写自己的查询条件

首先定义

private List<String> conditions=new ArrayList<String>();
用来存放你的条件

代码
public void searchOrder(){
//String EJBQL = "select customerOrder from CustomerOrder customerOrder";

if(this.timeBegin!=null){
conditions.add(
"customerOrder.timeCreated>=#{customerOrderList.timeBegin}");
}

setEjbql(EJBQL);
setRestrictionExpressionStrings(conditions);
setMaxResults(
25);
this.refresh();
//return this.getResultList();

}

 

相关文章:

  • 2021-07-17
  • 2022-12-23
  • 2021-05-16
  • 2021-08-13
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-11
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
相关资源
相似解决方案