在dao中查询出来的实体
return this.dao.getListByHQL("from 类名");
在controller中要得到这个list,
List<类名> 类名首字母小写= platformOrgService.findAllOrg();
request.setAttribute("类名首字母小写", 类名首字母小写);
本文介绍了一种在DAO层使用HQL查询实体的方法,并展示了如何在Controller层通过调用service方法获取并处理这些实体数据,最后将数据传递给前端。
在dao中查询出来的实体
return this.dao.getListByHQL("from 类名");
在controller中要得到这个list,
List<类名> 类名首字母小写= platformOrgService.findAllOrg();
request.setAttribute("类名首字母小写", 类名首字母小写);
1018
1918

被折叠的 条评论
为什么被折叠?