基于javaweb的SSM汽车俱乐部管理系统(java+ssm+jsp+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

170023332402

180023332402

190023332402

200023332402

220023332402

230023332402

240023332402

基于javaweb的SSM汽车俱乐部管理系统(java+ssm+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版本;

技术栈

  1. 后端:Spring+SpringMVC+Mybatis2. 前端:HTML+CSS+JavaScript+jsp

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;4. 运行项目,输入localhost:8080/ 登录

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
private MemberService memberService;

@RequestMapping({ "/login" })
public String login(final HttpSession session) {
final Employee employee = (Employee)session.getAttribute("employee");
if (employee != null) {
return "index";
}
return "login";
}

@RequestMapping({ "/logout" })
public String logout(final HttpSession session) {
final Employee employee = null;
session.setAttribute("employee", (Object)employee);
session.setMaxInactiveInterval(0);
return "login";
}

@RequestMapping({ "/index" })
public String index(final HttpServletRequest request, final HttpSession session, final Model model) {
Employee employee = (Employee)session.getAttribute("employee");
if (employee == null) {
final String username = request.getParameter("username");
final String password = request.getParameter("password");
if (username != null && !username.equals("") && password != null && !password.equals("")) {
employee = this.employeeService.login(username, password);
}
if (employee == null) {
System.out.println("\u6ca1\u6709\u5458\u5de5\uff0c\u8fd4\u56de\u767b\u5f55\u754c\u9762");
return "login";
}
session.setAttribute("employee", (Object)employee);
}
final List<TrainTmp> trainList = this.memberService.getAllTrain();
final List<Rescue> rescueList = this.memberService.getAllRescue();
final List<Travel> travelList = this.memberService.getAllTravel();
model.addAttribute("trainList", (Object)trainList);
model.addAttribute("rescueList", (Object)rescueList);
model.addAttribute("travelList", (Object)travelList);
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
54
    if (employee != null) {
return "index";
}
return "login";
}

@RequestMapping({ "/logout" })
public String logout(final HttpSession session) {
final Employee employee = null;
session.setAttribute("employee", (Object)employee);
session.setMaxInactiveInterval(0);
return "login";
}

@RequestMapping({ "/index" })
public String index(final HttpServletRequest request, final HttpSession session, final Model model) {
Employee employee = (Employee)session.getAttribute("employee");
if (employee == null) {
final String username = request.getParameter("username");
final String password = request.getParameter("password");
if (username != null && !username.equals("") && password != null && !password.equals("")) {
employee = this.employeeService.login(username, password);
}
if (employee == null) {
System.out.println("\u6ca1\u6709\u5458\u5de5\uff0c\u8fd4\u56de\u767b\u5f55\u754c\u9762");
return "login";
}
session.setAttribute("employee", (Object)employee);
}
final List<TrainTmp> trainList = this.memberService.getAllTrain();
final List<Rescue> rescueList = this.memberService.getAllRescue();
final List<Travel> travelList = this.memberService.getAllTravel();
model.addAttribute("trainList", (Object)trainList);
model.addAttribute("rescueList", (Object)rescueList);
model.addAttribute("travelList", (Object)travelList);
System.out.println("\u627e\u5230\u5458\u5de5\u4e86");
return "index";
}

@RequestMapping({ "/user/modify" })
@ResponseBody
public String modifyUser(final Employee employee, final HttpSession session) {
System.out.println(employee);
final int i = this.employeeService.modifyEmployee(employee);
session.setAttribute("employee", (Object)employee);
if (i != -1) {
System.out.println("successfully modify!!!");
}
return "success";
}

@RequestMapping({ "/userInfo" })
public String getEmployee(final Model model, final HttpSession session) {
final Employee employee = (Employee)session.getAttribute("employee");
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
    final List<Employee> employeeList = this.employeeService.getAllEmployee();
model.addAttribute("employeeList", (Object)employeeList);
return "employee";
}

@RequestMapping({ "/employee/{id}" })
@ResponseBody
public Employee getEmployeeById(@PathVariable("id") final String employeeId) {
final Employee employee = this.employeeService.getEmployeeById(employeeId);
System.out.println(employee);
return employee;
}

@RequestMapping({ "/employee/add" })
@ResponseBody
public String addEmployee(final Employee employee) {
employee.setEmployeePower("0");
System.out.println(employee);
int i = -1;
try {
i = this.employeeService.addEmployee(employee);
}
catch (Exception e) {
e.printStackTrace();
}
if (i != -1) {
System.out.println("successfully add!!!");
}
return "success";
}

@RequestMapping({ "/employee/delete/{id}" })
public String deleteEmployee(@PathVariable("id") final String employeeId) {
final int i = this.employeeService.deleteEmployee(employeeId);
if (i != -1) {
System.out.println("successfully delete!!!");
}
return "employee";
}

@RequestMapping({ "/employee/modify" })
@ResponseBody
public String modifyEmployee(final Employee employee) {
System.out.println(employee);
final int i = this.employeeService.modifyEmployee(employee);
if (i != -1) {
System.out.println("successfully modify!!!");
}
return "success";
}

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
}

@RequestMapping({ "/member/{id}" })
@ResponseBody
public Member getMemberById(@PathVariable("id") final String memberId) {
final Member memberById = this.memberService.getMemberById(memberId);
System.out.println(memberById);
return memberById;
}

@RequestMapping({ "/member/add" })
@ResponseBody
public String addMember(final Member member) {
System.out.println(member);
final int i = this.memberService.addMember(member);
if (i != -1) {
System.out.println("success");
}
return "success";
}

@RequestMapping({ "/member/delete/{id}" })
@ResponseBody
public String modifyMember(@PathVariable("id") final String memberId) {
final int i = this.memberService.deleteMember(memberId);
if (i != -1) {
System.out.println("success");
}
return "success";
}

@RequestMapping({ "/member/modify" })
@ResponseBody
public String modifyMember(final Member member) {
System.out.println(member);
final int i = this.memberService.modifyMember(member);
if (i != -1) {
System.out.println("success");
}
return "success";
}

@RequestMapping({ "/car/change/{id}" })
@ResponseBody
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
    System.out.println(travel);
System.out.println("?????");
final int i = this.memberService.modifyTravel(travel);
if (i != -1) {
System.out.println("success");
}
return "success";
}

@RequestMapping({ "/rescue" })
public String getAllRescue(final Model model) {
final List<Rescue> rescueList = this.memberService.getAllRescue();
final List<Car> carList = this.memberService.getAllCar();
model.addAttribute("rescueList", (Object)rescueList);
model.addAttribute("carList", (Object)carList);
return "rescue";
}

@RequestMapping({ "/rescue/{id}" })
@ResponseBody
public Rescue getRescueByRescueId(@PathVariable("id") final String rescueId) {
System.out.println("rescueId:" + rescueId);
final Rescue rescueByRescueId = this.memberService.getRescueByRescueId(rescueId);
System.out.println(rescueByRescueId);
return rescueByRescueId;
}

@RequestMapping({ "/rescue/add" })
@ResponseBody
public String addRescue(final Rescue rescue) {
System.out.println(rescue);
final int i = this.memberService.addRescue(rescue);
if (i != -1) {
System.out.println("success add rescue");
}
return "success";
}

@RequestMapping({ "/rescue/delete/{id}" })
@ResponseBody
public String deleteRescue(@PathVariable("id") final String rescueId) {
final int i = this.memberService.deleteRescue(rescueId);
if (i != -1) {
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
public String deleteEmployee(@PathVariable("id") final String employeeId) {
final int i = this.employeeService.deleteEmployee(employeeId);
if (i != -1) {
System.out.println("successfully delete!!!");
}
return "employee";
}

@RequestMapping({ "/employee/modify" })
@ResponseBody
public String modifyEmployee(final Employee employee) {
System.out.println(employee);
final int i = this.employeeService.modifyEmployee(employee);
if (i != -1) {
System.out.println("successfully modify!!!");
}
return "success";
}

@RequestMapping({ "/remind" })
public String getAllRemind(final Model model, final HttpSession session) {
final Employee employee = (Employee)session.getAttribute("employee");
final String employeeId = employee.getEmployeeId();
final List<Remind> remindList = this.employeeService.getRemindByEmployeeId(employeeId);
model.addAttribute("remindList", (Object)remindList);
return "remind";
}

@RequestMapping({ "/remind/{id}" })
@ResponseBody
public Remind getRemindByRemindId(@PathVariable("id") final String remindId) {
System.out.print(remindId);
final Remind r = this.employeeService.getRemindByRemindId(remindId);
System.out.println(r);
return r;
}

@RequestMapping({ "/remind/add" })
@ResponseBody
public String addRemind(final Remind remind) {
System.out.println(remind);


项目链接:
https://javayms.github.io?id=061422322105200jp
https://javayms.pages.dev?id=061422322105200jp