-
大小:文件類型: .7z金幣: 1下載: 0 次發布日期: 2023-10-09
- 語言: 其他
- 標簽: SSM框架??SpringBoot??SpringMVC??............??
資源簡介
《超市訂單管理系統》項目源碼 Mybatis+Spring+SpringMVC 框架
代碼片段和文件信息
package?cn.smbms.controller;
import?cn.smbms.pojo.Bill;
import?cn.smbms.pojo.Provider;
import?cn.smbms.pojo.User;
import?cn.smbms.service.bill.BillService;
import?cn.smbms.service.provider.ProviderService;
import?cn.smbms.tools.Constants;
import?cn.smbms.tools.PageSupport;
import?com.alibaba.fastjson.JSON;
import?com.alibaba.fastjson.JSONArray;
import?com.mysql.jdbc.StringUtils;
import?org.springframework.stereotype.Controller;
import?org.springframework.ui.Model;
import?org.springframework.web.bind.annotation.*;
import?javax.annotation.Resource;
import?javax.servlet.http.HttpServletRequest;
import?javax.servlet.http.HttpSession;
import?java.util.ArrayList;
import?java.util.Date;
import?java.util.HashMap;
import?java.util.List;
@Controller
@RequestMapping(“/sys/bill“)
public?class?BillController?{
????@Resource
????private?BillService?billService;
????@Resource
????private?ProviderService?providerService;
????@RequestMapping(value?=?“/list.html“)
????public?String?getBillList(Model?model
??????????????????????????????@RequestParam(value?=?“queryProductName“?required?=?false)?String?queryProductName
??????????????????????????????@RequestParam(value?=?“queryProviderId“?required?=?false)?String?queryProviderId
??????????????????????????????@RequestParam(value?=?“queryIsPayment“?required?=?false)?String?queryIsPayment
??????????????????????????????@RequestParam(value?=?“pageIndex“?required?=?false)?String?pageIndex)?{
????????int?_queryProviderId?=?0;
????????int?_queryIsPayment=0;
????????List?billList?=?new?ArrayList();
????????ListproviderList=new?ArrayList();
????????//設置頁面容量
????????int?pageSize?=?Constants.pageSize;
????????//當前頁碼
????????int?currentPageNo?=?1;
????????if?(queryProductName==null){
????????????queryProductName=““;
????????}
????????if?(queryProviderId?!=null?&&?!queryProviderId.equals(““)){
????????????_queryProviderId?=?Integer.parseInt(queryProviderId);
????????}
????????if?(queryIsPayment?!=null?&&?!queryIsPayment.equals(““)){
????????????_queryIsPayment?=?Integer.parseInt(queryIsPayment);
????????}
????????if?(pageIndex?!=?null)?{
????????????try?{
????????????????currentPageNo?=?Integer.valueOf(pageIndex);
????????????}?catch?(NumberFormatException?e)?{
????????????????return?“redirect:/sys/bill/syserror.html“;
????????????}
????????}
????????//總數量
????????int?totalCount?=?0;
????????try?{
????????????totalCount?=?billService.getBillCount(queryProductName_queryProviderId_queryIsPayment);
????????}?catch?(Exception?e)?{
????????????e.printStackTrace();
????????}
????????//總頁數
????????PageSupport?pages?=??new?PageSupport();
????????pages.setCurrentPageNo(currentPageNo);
????????pages.setPageSize(pageSize);
????????pages.setTotalCount(totalCount);
????????int?totalPageCount?=?pages.getTotalPageCount();
????????//控制首頁和尾頁
????????if(currentPageNo?1){
????????????currentPageNo?=?1;
????????}else?if(current
- 上一篇:opencv圖像分類樣本
- 下一篇:人工神經元網絡及其應用.pdf
評論
共有 條評論