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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM