• 大小: 277KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-23
  • 语言: 其他
  • 标签: SSM  idea  

资源简介

超市订单管理系统

资源截图

代码片段和文件信息

package controller;

import com.alibaba.fastjson.JSONArray;
import entity.Bill;
import entity.Provider;
import entity.Role;
import entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import service.BillService;
import service.ProvideService;
import service.UserService;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

@Controller
public class BillController {
    @Resource
    private BillService billService;
    @Resource
    private ProvideService provideService;
    @Resource
    private UserService userService;
    /**
     * 分页
     */
    @RequestMapping(value = “/Blist.html“)
    public String userlist(Model model String queryProductName String queryProviderIdString queryIsPayment String pageIndex){
        List providerList = null;
        int _queryProviderId = 0;
        int _queryIsPayment = 0;
        //设置当前页码
        int currentPageNo = 1;
        //设置页面总量
        int pageSize = 8;
        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 null;
            }
        }
        //表数据总量
        int totalCount = billService.Count(queryProductName _queryProviderId _queryIsPayment);
        //总页数
        int pageCount = totalCount%pageSize==0?totalCount/pageSize:totalCount/pageSize+1;

        providerList = billService.getUserList(queryProductName_queryProviderId_queryIsPaymentcurrentPageNopageSize);
        List providers = provideService.XLK();
        model.addAttribute(“providers“providers);
        model.addAttribute(“providerList“providerList);
        model.addAttribute(“queryProductName“queryProductName);
        model.addAttribute(“queryProviderId“_queryProviderId);
        model.addAttribute(“queryIsPayment“_queryIsPayment);
        model.addAttribute(“pageCount“pageCount);
        model.addAttribute(“totalCount“totalCount);
        model.addAttribute(“currentPageNo“currentPageNo);
        return “jsp/billlist“;
    }
    /**
     * 为添加方法写一个空的Provider
     * @param bill
     * @param model
     * @return
     */
    @RequestMapping(value = “/Billadd.do“method = RequestMethod.GET)
    public String toAdd(@ModelAttribute(“bill“) Bill bill Model model){
        List list = provideService

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3529  2018-08-29 19:50  18欧华飞\CH07\smbms\.idea\artifacts\smbms_Web_exploded.xml

     文件        637  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\compiler.xml

     文件         97  2018-08-17 14:15  18欧华飞\CH07\smbms\.idea\description.html

     文件        565  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__aopalliance_aopalliance_1_0.xml

     文件        576  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__commons_dbcp_commons_dbcp_1_4.xml

     文件        656  2018-08-29 19:13  18欧华飞\CH07\smbms\.idea\libraries\Maven__commons_fileupload_commons_fileupload_1_2_2.xml

     文件        554  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__commons_io_commons_io_2_4.xml

     文件        623  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__commons_logging_commons_logging_1_1_3.xml

     文件        590  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__commons_pool_commons_pool_1_5_4.xml

     文件        565  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__com_alibaba_fastjson_1_2_47.xml

     文件        524  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__javax_servlet_jstl_1_2.xml

     文件        573  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__javax_servlet_servlet_api_2_5.xml

     文件        641  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__javax_validation_validation_api_1_0_0_GA.xml

     文件        543  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__joda_time_joda_time_2_3.xml

     文件        506  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__junit_junit_4_12.xml

     文件        520  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__log4j_log4j_1_2_17.xml

     文件        625  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__mysql_mysql_connector_java_5_1_30.xml

     文件        593  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__org_aspectj_aspectjweaver_1_6_9.xml

     文件        583  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__org_hamcrest_hamcrest_core_1_3.xml

     文件        685  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__org_hibernate_hibernate_validator_4_3_2_Final.xml

     文件        645  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__org_jboss_logging_jboss_logging_3_1_0_CR2.xml

     文件        551  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__org_mybatis_mybatis_3_2_2.xml

     文件        600  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__org_mybatis_mybatis_spring_1_2_0.xml

     文件        667  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__org_springframework_spring_aop_3_2_13_RELEASE.xml

     文件        681  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__org_springframework_spring_beans_3_2_13_RELEASE.xml

     文件        695  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__org_springframework_spring_context_3_2_13_RELEASE.xml

     文件        674  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__org_springframework_spring_core_3_2_13_RELEASE.xml

     文件        716  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__org_springframework_spring_expression_3_2_13_RELEASE.xml

     文件        674  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__org_springframework_spring_jdbc_3_2_13_RELEASE.xml

     文件        660  2018-08-17 14:19  18欧华飞\CH07\smbms\.idea\libraries\Maven__org_springframework_spring_tx_3_2_13_RELEASE.xml

............此处省略157个文件信息

评论

共有 条评论