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