SSM分页、多条件查询
来源:互联网 发布:上海浦东软件协会朱 编辑:程序博客网 时间:2024/05/21 03:56
jsp页面首页、尾页、上一页、下一页
================================================================================================================
<c:if test="${empty orderList}">
<tr><td colspan="10" style="text-align:center"><font color="#3598dc">查无数据</font></td></tr></c:if>
<c:if test="${not empty orderList}">
<c:forEach items="${orderList}" var="a" varStatus="status" >
<tr>
<td style="padding:0 0 0 5px;width:80px;">${ status.index + 1+offset}</td>
<td style="padding:0 0 0 5px;width:100px;">${a.order_id }</td>
<td style="padding:0 0 0 5px;width:100px;">${a.real_name }</td>
<td style="padding:0 0 0 5px;width:100px;">${a.identification }</td>
<td style="padding:0 0 0 5px;width:40px;">
<c:if test="${a.sex==1 }">男</c:if>
<c:if test="${a.sex==2 }">女</c:if>
<c:if test="${a.sex==3 }">不确定</c:if></td>
<td style="padding:0 0 0 5px;width:130px;">${a.phone_num }</td>
<td style="padding:0 0 0 5px;width:230px;"><fmt:formatDate value="${a.upd_ymdhms}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td style="padding:0 0 0 5px;width:80px;">
<c:if test="${a.status==1 }"> 等待支付</c:if>
<c:if test="${a.status==2 }"> 已取消</c:if>
<c:if test="${a.status==3 }"> 支付完成</c:if></td>
<td style="padding:0 0 0 5px;width:100px;">${a.sysuser_name }</td>
<td style="padding:0 0 0 5px;width:170px;">
<a href="SearchOrderByOrderId.action?orderId=${a.order_id }">
<span class="handle" id="see_order">查看</span></a>
<c:if test="${a.status==1 }">|
<a href="UpdateOrderStatus.action?orderId=${a.order_id }"><span class="handle">取消</span></a> </c:if>|
<a href="UpdateOrderUp.action?orderId=${a.order_id }"><span class="handle" id="edi_order">编辑</span></a></td>
</tr></c:forEach>
</c:if>
controller部分代码
================================================================================================================
List<OrderCustomerSysuser> ocslist = orderService.findOrderCustomerSysuser(sysuserId,offset, pagesize, real_name,phone_num, order_id);
int count = orderService.selectCountToOrderCustomSysuser(sysuserId,real_name, phone_num, order_id);
int pageTemp=10;
//pageCount 为页数
int pageCount = count%pageTemp==0?count/pageTemp:count/pageTemp+1;
//当前是第几页
int currentPage = offset / pagesize + 1;
ModelAndView modelAndView = new ModelAndView();
modelAndView.addObject("orderList", ocslist);
modelAndView.addObject("phone_num", phone_num);
modelAndView.addObject("order_id", order_id);
modelAndView.addObject("real_name", real_name);
modelAndView.addObject("offset", offset);//从第几条开始查询
modelAndView.addObject("pagesize", pagesize);//每页显示几条数据
modelAndView.addObject("pageCount", pageCount);//为页数
modelAndView.addObject("currentPage", currentPage);//当前是第几页
modelAndView.addObject("count", count);
// 指定视图
modelAndView.setViewName("/Order_management.jsp");
return modelAndView;
- SSM分页、多条件查询
- ssm根据条件查询分页,后台分页
- SSM实现多条件查询
- yii 多条件查询,分页
- JPA多条件查询+分页
- 用户分页多条件查询
- 分页&条件查询分页
- SSM+Maven 分页查询
- ssm实现分页查询
- SSM框架 Mybatis联合查询 多表查询 分页
- Grails 多条件查询和分页
- Oracle多条件查询分页存储过程
- Spring jpa data多条件分页查询
- 分页和多条件查询功能
- MVC 列表多条件动态查询分页
- 多条件查询无刷新分页
- 分页和多条件查询功能
- 多查询条件的MVC分页
- 后台得到时间戳到jsp中转换为日期显示
- Windows文件夹管理:删除重建问题
- Flume实战采集文件内容存入HDFS
- springmvc form中 commandName和modelAttribute的疑问
- Eclipse中配置mybatis-3-config.dtd
- SSM分页、多条件查询
- leetcode133. Clone Graph
- Hive 数据库仓库的基本操作
- 并查集基本介绍
- float和double的区别
- DeepWalk 论文笔记
- 代码实现开关灯效果
- 【Echarts】Echarts2.0动态加载扇形图。
- 《一线大厂如何面试前端工程师》听后感