日期:2014-05-19 浏览次数:20745 次
/**@see {@link TopicDao#getTopicList(int, int, int, int)}*/
@Override
public Page<BBSTopic> getTopicList(int topicid, int pageNum, int pageSize,
int size) throws Exception {
String hql = " select new BBSTopic(id,uName,topicTitle,allView," +
"allReplay,isHaveImage,isHaveVideo,createTime," +
"isBirght,birghtEndTime,birghtColor,isTop," +
"topEndTime,isSoul,soulEndTime,lastModifyTime,htmlPath) " +
"from BBSTopic a where EXISTS " +
"(select 'x' from BBSEdition c where " +
"SUBSTR(edtionString,(select GROUP_CONCAT(d.edtionStart,',',d.edtionEnd) " +
"from BBSEdition d where d.id=:id))=:editId and c.id=a.editionid) and a.topicStatus=:topicStatus ";
Map<String, Object> parmap = new HashMap<String, Object>();
parmap.put("id", topicid);
parmap.put("editId", topicid);
parmap.put("topicStatus",BBSTopic.STATUS_已审核);
return baseDao.findPageReList(hql, parmap, true, size, pageSize,
pageNum);
}
at com.onionportal.until.dao.imp.BaseDAOImpl$7.doInHibernate(BaseDAOImpl.java:182)
at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
at com.onionportal.until.dao.imp.BaseDAOImpl.findEntity(BaseDAOImpl.java:178)
at com.onionportal.until.dao.imp.BaseDAOImpl.findPageReList(BaseDAOImpl.java:485)
at com.onionportal.bbs.dao.imp.TopicDaoImp.getTopicList(TopicDaoImp.java:44)