jeecg 里面的三种查询,第一种直接针对数据库查询,自定义查询语法

jeecg 里面的三种查询,第一种直接针对数据库查询,自定义查询语法

第一种查询:
TSTypegroup tsTypegroup = systemService.findUniqueByProperty(TSTypegroup.class, "typegroupcode","enterprise_property");
String string = tsTypegroup.getId();
String hql = "from TSType t where TSTypegroup = '"+string+"'";
List<TSType> tsTypes = systemService.findByQueryString(hql);


第二种查询:
TSTypegroup tsTypegroup = systemService.findUniqueByProperty(TSTypegroup.class, "typegroupcode","enterprise_property");
String string = tsTypegroup.getId();
CriteriaQuery cq = new CriteriaQuery();
cq.eq("TsTypegroup", string);
cq.add();
List<TSType> tsType1=systemService.getListByCriteriaQuery(cq, false);

第三种查询:
TSTypegroup tsTypegroup = systemService.findUniqueByProperty(TSTypegroup.class, "typegroupcode","enterprise_property");
String string = tsTypegroup.getId();
List<TSType> tsType = systemService.findByProperty(TSType.class, "TsTypegroup", string);
————————————————
版权声明:本文为CSDN博主「无极仙翁」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/u010916338/java/article/details/52528522

原文地址:https://www.cnblogs.com/Jeely/p/12613875.html