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