DAO层
public List GetByProperty(String property, Object value, String orderby,
int size) throws Exception {
List list = null;
try {
list = this.getSession().createCriteria(HLivingSkill.class).add(
Expression.eq(property, value)).addOrder(
Order.desc(orderby)).setMaxResults(size).list();
} catch (Exception ex) {
throw new Exception(ex);
}
return list;
}
serivce 层
public List getLivingSkillByGuanzhu(int size) throws Exception {
// TODO Auto-generated method stub
return this.livingSkillDAO.GetByProperty("status",
HConstants.CEM_HUIGOU_STATUS_WAIT, "visitCount", size);
}
按访问量visitCount排序,为什么取出来的值没有按访问量visitCount  排序(desc)
???