毕业论文-crm1

1.我们要做带有搜索功能的分页客户列表

分析:页面输出:查询条件,当前页数,每页显示条数,点击筛选提交到CustomerAction_list

CustomerAction_list中:1.调用Service处理分页逻辑,会返回业务逻辑处理结果,就是返回一个pageBean

2.把返回的对象pageBean存放到requestScope中,

3.转发到list.jsp显示结果

后台向页面输出:5个数据,都封装都pageBean中

分别是:1客户列表(一个list<Customer> list)调用dao

2当前页数:(currentPage)前台传过来

3总记录数:(totalCount)调用dao查出来

4每页显示条数(pageSize)前台传入

5总页数(totalPage)根据总记录数以及每页显示条数算出来

在CustomerService中

PageBean getPageBean(Customer c,Integer currentPage,Integer pageSize){

}

//调用dao查询总记录数

//封装PageBean,计算总页数

//查询客户列表

//返回pageBean

dao中

int getTotalCount(String cust_name);//查询总记录数

List<Customer> getList(String cust, int start, int pageSize);//这个是查询客户列表

如下图所示:

毕业论文-crm1