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


相关文章:

  • 2021-12-20
  • 2022-01-26
  • 2021-08-29
  • 2022-12-23
  • 2021-12-15
  • 2021-05-16
  • 2021-06-21
  • 2022-02-09
猜你喜欢
  • 2021-06-24
  • 2021-11-05
  • 2021-09-21
  • 2021-12-02
  • 2021-06-18
  • 2021-06-18
  • 2022-02-09
相关资源
相似解决方案