——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明






基于javaweb的SSM在线物流综合管理平台系统(java+ssm+js+jsp+mysql)
项目介绍
管理员角色包含以下功能 管理员登录,管理员管理,合作公司管理,车型信息,货物基本信息,汽车详细情况,客户留言,订单管理等功能。
用户角色包含以下功能: 网站首页,查看企业介绍,查看经营范围,服务网络查看,业务流程查看,客户留言,客户下单管理等功能。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.数据库:MySql 5.7版本;
技术栈
- 后端:Spring+SpringMVC+Mybatis 2. 前端:HTML+CSS+JavaScript+jsp
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/ 登录
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| String realPath = request.getSession().getServletContext() .getRealPath("/assets/upload"); File pathFile = new File(realPath); if (!pathFile.exists()) { pathFile.mkdirs(); } System.out.println("文件类型:" + file.getContentType()); System.out.println("文件名称:" + file.getOriginalFilename()); System.out.println("文件大小:" + file.getSize()); System.out.println("................................................."); IPTimeStamp ip = new IPTimeStamp(); System.out.println(ip.getTimeStamp()); String ext = FilenameUtils.getExtension(file.getOriginalFilename()); String newfilename = ip.getTimeStamp() + "." + ext;
FileUtils.copyInputStreamToFile(file.getInputStream(), new File(realPath, newfilename)); emp.setPhoto(newfilename); int count = empService.saveEmp(emp); System.out.println(count); return "redirect:/emp/list"; }
@RequestMapping(value = "/delete", method = RequestMethod.GET) public String delete(Emp emp) {
empService.delete(emp); return "redirect:/emp/list"; }
@RequestMapping(value = "/update", method = RequestMethod.GET) public String toupdate(Emp emp, Model model) {
Emp findemp = empService.findbyid(emp.getId());
model.addAttribute("emp", findemp);
return "emp/edit"; }
@RequestMapping(value = "/update", method = RequestMethod.POST) public String update(Emp emp, @RequestParam("file") MultipartFile file, HttpServletRequest request) throws IOException {
String realPath = request.getSession().getServletContext() .getRealPath("/assets/upload");
File pathFile = new File(realPath);
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| Sysfunction list = functionService.selectByid(id); model.addAttribute("item", list); return "sysfunction/edit"; }
@RequestMapping(value = "/update",method = RequestMethod.POST) public String update(Sysfunction sysfunction){ int count = functionService.updateFun(sysfunction); if(count < 0){ return "error"; } return "redirect:/function/list"; }
@RequestMapping(value = "/add",method = RequestMethod.GET) public String toadd(){ return "sysfunction/add"; }
@RequestMapping(value="/add",method=RequestMethod.POST) public String add(Sysfunction sysfunction){ int count = functionService.addFun(sysfunction); if(count < 0){ return "error"; } return "redirect:/function/list"; }
@RequestMapping(value="/addsub",method=RequestMethod.GET) public String toaddsub(){
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| } @RequestMapping(value="/delete",method=RequestMethod.GET) public String delete(Business business,Model model){ int count = businessService.deletebyid(Integer.valueOf(business.getId())); System.out.println(count); return "forward:/business/listbycid"; } }
@Controller @RequestMapping("/cartype") public class CartypeController {
@Autowired private CartypeService cartypeService;
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| }
@RequestMapping(value="/list") public String list(@RequestParam(name="current",defaultValue="1")int current,@RequestParam(name="goods",defaultValue="")String goods,Model model){ PageInfo pageInfo = orderService.listPage(current,goods); model.addAttribute("pager", pageInfo); return "order/list"; } @RequestMapping("/delete") public String delete(@RequestParam("id")int id){ int count = orderService.delete(id); if(count < 0){ return "error"; } return "redirect:/order/list"; } }
@Controller @RequestMapping({"/front"}) public class FrontController {
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| * @param request * @return */ @RequestMapping(value="/search",method=RequestMethod.POST) public String search(String funname,Model model){ List<Sysfunction> list = functionService.selectByFunName(funname); model.addAttribute("funList", list); return "sysfunction/list"; }
@RequestMapping(value="/update",method = RequestMethod.GET) public String toupdate(@Param("id")int id,Model model){ Sysfunction list = functionService.selectByid(id); model.addAttribute("item", list); return "sysfunction/edit"; }
@RequestMapping(value = "/update",method = RequestMethod.POST) public String update(Sysfunction sysfunction){ int count = functionService.updateFun(sysfunction); if(count < 0){ return "error"; } return "redirect:/function/list"; }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| * @return */ @RequestMapping(value="/checkusername",method=RequestMethod.POST,produces="application/json; charset=UTF-8" ) public @ResponseBody Reg checkusername(String username){ Reg reg = new Reg(200 , "可以注册"); sysuser finduser = userService.findbyusername(username); if(finduser==null){ return reg; } reg.setCode(500); reg.setMsg("账号已经存在"); return reg; }
@RequestMapping(value="/search",method=RequestMethod.POST) public String search(String username,Model model){ if(username==null){ username=""; } List<sysuser> searchlist = userService.searchbyusername(username); model.addAttribute("listuser", searchlist); return "sysuser/list"; }
}
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=331122572008200tp
https://javayms.pages.dev?id=331122572008200tp