Source not found for OrderService$$FastClassByCGLIB$$458656b7.invoke(int, Object, Object[]) line: not available
DAO层:
public List findByPageUid(Integer uid, Integer begin, Integer limit) {
String hql = "from Order o where o.user.uid = ? order by ordertime desc";
List list = this.getHibernateTemplate().execute(
new PageHibernateCallback(hql, new Object[] { uid },
begin, limit));
if (list != null && list.size() > 0) {
return list;
}
return null;
}
Service:
public PageBean<Order> findByPageUid(Integer uid, Integer page) {
PageBean<Order> pageBean=new PageBean<Order>();
//设置当前页数
pageBean.setPage(page);
//设置每页显示的记录数
Integer limit=5;
pageBean.setLimit(limit);
//设置总记录数
Integer totalCount=null;
totalCount=orderDao.findByCountUid(uid);
pageBean.setTotalCount(totalCount);
//设置总页数
Integer totalPage=null;
if(totalCount % limit==0){
totalPage=totalCount/limit;
}else{
totalPage=totalCount/limit+1;
}
pageBean.setTotalPage(totalPage);
//设置每页显示数据集合
Integer begin=(page-1) *limit;
List<Order> list=orderDao.findByPageUid(uid,begin,limit);
return pageBean;
}
action:
public String findByUid(){
//根据用户的ID查询
User user=(User)ServletActionContext.getRequest().getSession().getAttribute("existUser");
//调用service
// 获得用户的id
Integer uid = user.getUid();
PageBean<Order> pageBean=orderService.findByPageUid(uid,page);
//分页数据显示到页面上
ActionContext.getContext().getValueStack().set("pageBean", pageBean);
return "findByUidSuccess";
}