String hql = "select new map ( count(t.pushId) as count,t.subjclassId as subjclassId) from MemberPushProj t where t.productId="+productId+" and t.memberPerInfoInPushProj.loginId="+memid+" group by t.subjclassId";
List l = pushProjDao.find(hql);
if (l != null && l.size() > 0) {
String about="";
for(Iterator iter=l.iterator();iter.hasNext();){
Map map=(Map) iter.next();
about+=map.get("subjclassId")+"("+map.get("count")+"),";
System.out.println(about);
}
}
hibernate new() 返回值使用
最新推荐文章于 2020-06-20 23:40:58 发布