hibernate 多查询or的用法
来源:互联网 发布:json key value 数组 编辑:程序博客网 时间:2024/05/21 09:05
@RequestMapping(params = "datagridError")
public void datagridError(UadptTacActDataEntity uadptTacActData,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
CriteriaQuery cq = new CriteriaQuery(UadptTacActDataEntity.class, dataGrid);
//查询条件组装器
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, uadptTacActData, request.getParameterMap());
try{
//自定义追加查询条件,statusTac是实体类的属性,0是为了优化,比不等于1效率高
cq.add(Restrictions.or(
Restrictions.eq("statusTac", 0),
Restrictions.eq("statusTerminal", 0),
Restrictions.eq("statusBrand", 0),
Restrictions.eq("statusModel", 0),
Restrictions.eq("statusCmType", 0),
Restrictions.eq("statusDual", 0),
Restrictions.eq("statusSoftLock", 0),
Restrictions.eq("statusNettypeUni", 0),
Restrictions.eq("statusNettypeOth", 0)));
}catch (Exception e) {
throw new BusinessException(e.getMessage());
}
cq.add();
this.uadptTacActDataService.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid);
}
public void datagridError(UadptTacActDataEntity uadptTacActData,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
CriteriaQuery cq = new CriteriaQuery(UadptTacActDataEntity.class, dataGrid);
//查询条件组装器
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, uadptTacActData, request.getParameterMap());
try{
//自定义追加查询条件,statusTac是实体类的属性,0是为了优化,比不等于1效率高
cq.add(Restrictions.or(
Restrictions.eq("statusTac", 0),
Restrictions.eq("statusTerminal", 0),
Restrictions.eq("statusBrand", 0),
Restrictions.eq("statusModel", 0),
Restrictions.eq("statusCmType", 0),
Restrictions.eq("statusDual", 0),
Restrictions.eq("statusSoftLock", 0),
Restrictions.eq("statusNettypeUni", 0),
Restrictions.eq("statusNettypeOth", 0)));
}catch (Exception e) {
throw new BusinessException(e.getMessage());
}
cq.add();
this.uadptTacActDataService.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid);
}
0 0
- hibernate多个查询or的用法
- hibernate 多查询or的用法
- hibernate的or查询
- Hibernate or 的用法
- hibernate-criteria的or()用法
- hibernate 查询的用法
- Hibernate 条件查询的用法
- hibernate中多表查询的用法
- hibernate Criteria中or的用法
- Hibernate 条件or查询 循环多个or条件
- hibernate hibernate 多条件与查询:Restrictions.or
- hibernate hibernate 多条件与查询:Restrictions.or
- hibernate中DetachedCriteria查询的用法
- 关于Hibernate的QBC查询hibernate_Restrictions用法
- 关于Hibernate QBC语句逻辑或(or)的查询方法
- mysq中or的用法和多条件查询的写法
- hibernate criteria Restrictions连接多个or查询语句
- hibernate Restrictions 用法 查询
- 虚幻4 独立服务器设置
- ajax/php/javascript实现简单的图片瀑布
- C++ STL算法系列6---copy函数
- android广播用法
- 堆排
- hibernate 多查询or的用法
- 文章标题
- Path Sum II
- iOS开发之原来Runtime的黑魔法这么厉害
- poj 3104 Drying 二分答案
- Convolutional neural networks(CNN) (十一) Convolution and Pooling Exercise
- Vector小记
- MYSQL下载安装配置卸载图文教程
- Windows下用脚本批量重命名文件