——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8、Node.js≥14
开发工具
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
❗没学过node.js的不要搞前后端分离项目
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明






基于javaweb的SSM+Maven汽车租赁管理系统(java+ssm+vue+elementui+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.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目 6.数据库:MySql 5.7/8.0等版本均可;
技术栈
后端:SSM(Spring+SpringMVC+Mybatis) 前端:ElementUI+Vue
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,修改配置,运行项目; 3. 将项目中config.properties配置文件中的数据库配置改为自己的配置,然后运行; 前台运行地址:http://localhost:8080/ssm6vo2w/front/index.html 后台运行地址:http://localhost:8080/ssm6vo2w/admin/dist/index.html 管理员:abo/abo 用户:用户1/123456
——————————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
| return R.ok(); }
@RequestMapping("/remind/{columnName}/{type}") public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) { map.put("column", columnName); map.put("type", type); if(type.equals("2")) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Calendar c = Calendar.getInstance(); Date remindStartDate = null; Date remindEndDate = null; if(map.get("remindstart")!=null) { Integer remindStart = Integer.parseInt(map.get("remindstart").toString()); c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart); remindStartDate = c.getTime(); map.put("remindstart", sdf.format(remindStartDate)); } if(map.get("remindend")!=null) { Integer remindEnd = Integer.parseInt(map.get("remindend").toString()); c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindEnd); remindEndDate = c.getTime(); map.put("remindend", sdf.format(remindEndDate)); } } Wrapper<WeizhangjiluEntity> wrapper = new EntityWrapper<WeizhangjiluEntity>(); if(map.get("remindstart")!=null) { wrapper.ge(columnName, map.get("remindstart")); } if(map.get("remindend")!=null) { wrapper.le(columnName, map.get("remindend")); }
String tableName = request.getSession().getAttribute("tableName").toString(); if(tableName.equals("yonghu")) { wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username")); }
int count = weizhangjiluService.selectCount(wrapper);
|
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
| * 后端列表 */ @RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,StoreupEntity storeup, HttpServletRequest request){ if(!request.getSession().getAttribute("role").toString().equals("管理员")) { storeup.setUserid((Long)request.getSession().getAttribute("userId")); }
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>(); PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params)); return R.ok().put("data", page); }
@RequestMapping("/list") public R list(@RequestParam Map<String, Object> params,StoreupEntity storeup, HttpServletRequest request){ if(!request.getSession().getAttribute("role").toString().equals("管理员")) { storeup.setUserid((Long)request.getSession().getAttribute("userId")); }
EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>(); PageUtils page = storeupService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, storeup), params), params)); return R.ok().put("data", page); }
@RequestMapping("/lists") public R list( StoreupEntity storeup){ EntityWrapper<StoreupEntity> ew = new EntityWrapper<StoreupEntity>(); ew.allEq(MPUtil.allEQMapPre( storeup, "storeup")); return R.ok().put("data", storeupService.selectListView(ew)); }
@RequestMapping("/query")
|
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
| */ @IgnoreAuth @RequestMapping("/register") public R register(@RequestBody YonghuEntity yonghu){ YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming())); if(user!=null) { return R.error("注册用户已存在"); } Long uId = new Date().getTime(); yonghu.setId(uId); yonghuService.insert(yonghu); return R.ok(); }
@RequestMapping("/logout") public R logout(HttpServletRequest request) { request.getSession().invalidate(); return R.ok("退出成功"); }
@RequestMapping("/session") public R getCurrUser(HttpServletRequest request){ Long id = (Long)request.getSession().getAttribute("userId"); YonghuEntity user = yonghuService.selectById(id); return R.ok().put("data", user); }
@IgnoreAuth @RequestMapping(value = "/resetPass") public R resetPass(String username, HttpServletRequest request){ YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", username)); if(user==null) { return R.error("账号不存在"); } user.setMima("123456"); yonghuService.updateById(user); return R.ok("密码已重置为:123456"); }
|
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
| @RequestMapping("/register") public R register(@RequestBody YonghuEntity yonghu){ YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming())); if(user!=null) { return R.error("注册用户已存在"); } Long uId = new Date().getTime(); yonghu.setId(uId); yonghuService.insert(yonghu); return R.ok(); }
@RequestMapping("/logout") public R logout(HttpServletRequest request) { request.getSession().invalidate(); return R.ok("退出成功"); }
@RequestMapping("/session") public R getCurrUser(HttpServletRequest request){ Long id = (Long)request.getSession().getAttribute("userId"); YonghuEntity user = yonghuService.selectById(id); return R.ok().put("data", user); }
@IgnoreAuth @RequestMapping(value = "/resetPass") public R resetPass(String username, HttpServletRequest request){ YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", username)); if(user==null) { return R.error("账号不存在"); } user.setMima("123456"); yonghuService.updateById(user); return R.ok("密码已重置为:123456"); }
|
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
|
@RequestMapping("/query") public R query(QicheleixingEntity qicheleixing){ EntityWrapper< QicheleixingEntity> ew = new EntityWrapper< QicheleixingEntity>(); ew.allEq(MPUtil.allEQMapPre( qicheleixing, "qicheleixing")); QicheleixingView qicheleixingView = qicheleixingService.selectView(ew); return R.ok("查询汽车类型成功").put("data", qicheleixingView); }
@RequestMapping("/info/{id}") public R info(@PathVariable("id") String id){ QicheleixingEntity qicheleixing = qicheleixingService.selectById(id); return R.ok().put("data", qicheleixing); }
@RequestMapping("/detail/{id}") public R detail(@PathVariable("id") String id){ QicheleixingEntity qicheleixing = qicheleixingService.selectById(id); return R.ok().put("data", qicheleixing); }
@RequestMapping("/save") public R save(@RequestBody QicheleixingEntity qicheleixing, HttpServletRequest request){ qicheleixing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
qicheleixingService.insert(qicheleixing); return R.ok(); }
@RequestMapping("/add") public R add(@RequestBody QicheleixingEntity qicheleixing, HttpServletRequest request){ qicheleixing.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=260023061907201bj
https://javayms.pages.dev?id=260023061907201bj