NutzCN Logo
问答 where () and () 这种用CRI 怎么拼
发布于 2867天前 作者 qq_cd48ca64 2251 次浏览 复制 上一个帖子 下一个帖子
标签:

where (createDateTime>'2016-05-09 10:30:08' or createDateTime<'2015-05-09 10:30:08') and (mobile is not null)
比如这样的
where () and () 这种用CRI 怎么拼

2 回复

其实能搜到的。

// where a=1 and (b =2 or c =3)
Cnd.where("a","=",1).and(Cnd.exps("b","=",2).or("c","=",3));

Criteria cri = Cnd.cri();
if(StringUtils.isNotBlank(mobile))
{
cri.where().and(createDateTime>'2016-05-09 10:30:08') OR (createDateTime<'2015-05-09 10:30:08');
}
你试试。应该是这个意思。

添加回复
请先登陆
回到顶部