首页>代码>spring boot+mybatis+spring mvc整合开发超市订单后台管理系统>/超市订单管理系统/SMBMS/src/main/java/com/elead/controller/BillController.java
package com.elead.controller; import java.util.HashMap; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.elead.pojo.SmbmsBill; import com.elead.service.BillService; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @Controller @RequestMapping("/jsp") public class BillController { @Autowired private BillService billService; @RequestMapping("/getBillList") @ResponseBody public Map<String, Object> getBillList(Integer pageNum, Integer pageSize, SmbmsBill bill) { System.out.println(pageNum+"================="); System.out.println(pageSize+"================="); System.out.println(bill.toString()+"================="); // 开始分页 PageHelper.startPage(pageNum, pageSize); PageInfo<SmbmsBill> allBill = billService.getAllBill(bill); // 新建一个map集合用于存储数据 Map<String, Object> map = new HashMap<String, Object>(); // 总条数 map.put("total", allBill.getTotal()); // 结果集 map.put("rows", allBill.getList()); // 当前页 map.put("pageNum", allBill.getPageNum()); // 每页的数量 map.put("pageSize", allBill.getPageSize()); // 当前页的数量 map.put("size", allBill.getSize()); // 总页数 map.put("pages", allBill.getPages()); // 所有导航页号 map.put("navigatepageNums", allBill.getNavigatepageNums()); // 是否为首页 map.put("isIsFirstPage", allBill.isIsFirstPage()); // 最后一页 map.put("isIsLastPage", allBill.isIsLastPage()); System.out.println("开始遍历商品"); System.err.println("订单管理后台信息:"+map); return map; } }
最近下载更多
微信网友_6013389878005760 LV3
2023年9月14日
18584457462 LV5
2023年5月7日
1613619109 LV6
2023年3月9日
liangge2115 LV27
2022年12月4日
计算机暴龙战士 LV16
2022年11月16日
djkhakjhbfjdwk LV2
2022年9月4日
578291727 LV15
2022年6月14日
doupijiang LV3
2022年5月22日
wangtao1111111111 LV15
2022年5月16日
sunlzh888888 LV28
2022年4月6日