基于javaweb的SSM景点门票预订管理系统(java+ssm+jsp+bootstrap+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

410023502402

420023502402

430023502402

440023502402

450023502402

470023502402

基于javaweb的SSM景点门票预订管理系统(java+ssm+jsp+bootstrap+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+Mybatis 2. 前端:JSP+bootstrap+jQuery

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中db.properties配置文件中的数据库配置改为自己的配置; 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
41
42
43
44
45

@Controller
@RequestMapping("/touristtype.do")
public class TouristTypeController {

@Autowired
private TouristTypeService touristTypeService;
@RequestMapping(params="method=typeMain")
public ModelAndView typeMain(HttpServletRequest request,HttpServletResponse response){
ModelAndView mav = new ModelAndView();
mav.setViewName("admin/typeMain");
return mav;
}
@RequestMapping(params="method=typeMainData")
public ModelAndView typeMainData(HttpServletRequest request,HttpServletResponse response,@ModelAttribute TouristType type){
List<TouristType> list = new ArrayList<TouristType>();
JSONObject obj = new JSONObject();
try{
if(StringUtils.isBlank(type.getName())){
type.setName(null);
}
list=this.touristTypeService.findTouristTypeList(type);
}
catch(Exception ex){

}
obj.put("rows", list);
obj.put("total", list.size());
return CommonResponse.JsonAjax(obj.toString());
}
@RequestMapping(params="method=getTypeList")
public ModelAndView getTypeList(HttpServletRequest request,HttpServletResponse response){
List<TouristType> list = new ArrayList<TouristType>();
JSONArray array = new JSONArray();
try{
TouristType type = new TouristType();
list=this.touristTypeService.findTouristTypeList(type);
for(TouristType touristtyppe : list){
JSONObject obj = new JSONObject();
obj.put("code", touristtyppe.getId());
obj.put("text", touristtyppe.getName());
array.add(obj);
}
}
catch(Exception ex){
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



@Controller("/zxinfo.do")
public class ZiXuninfoController {

@Autowired
private ZiXuninfoService touristService;

@RequestMapping(params="method=touristMain")
public ModelAndView touristMain(HttpServletRequest request,HttpServletResponse response){
ModelAndView mav = new ModelAndView();
mav.setViewName("admin/zxinfoMain");
return mav;
}
@RequestMapping(params="method=touristMainData")
public ModelAndView touristMainData(HttpServletRequest request,HttpServletResponse response,@ModelAttribute ZiXuninfo tourist){
response.setContentType("text/html;charset=utf-8");
List<ZiXuninfo> list = new ArrayList<ZiXuninfo>();
JSONObject obj = new JSONObject();
try{
if(StringUtils.isBlank(tourist.getName())){
tourist.setName(null);
}
list=this.touristService.findZiXunList(tourist);
}
catch(Exception e){

}
obj.put("rows", list);
obj.put("total", list.size());
return CommonResponse.JsonAjax(obj.toString());
}
@RequestMapping(params="method=toAddTourist")
public ModelAndView toAddTourist(HttpServletRequest request,HttpServletResponse response){
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

@Controller("/zxinfo.do")
public class ZiXuninfoController {

@Autowired
private ZiXuninfoService touristService;

@RequestMapping(params="method=touristMain")
public ModelAndView touristMain(HttpServletRequest request,HttpServletResponse response){
ModelAndView mav = new ModelAndView();
mav.setViewName("admin/zxinfoMain");
return mav;
}
@RequestMapping(params="method=touristMainData")
public ModelAndView touristMainData(HttpServletRequest request,HttpServletResponse response,@ModelAttribute ZiXuninfo tourist){
response.setContentType("text/html;charset=utf-8");
List<ZiXuninfo> list = new ArrayList<ZiXuninfo>();
JSONObject obj = new JSONObject();
try{
if(StringUtils.isBlank(tourist.getName())){
tourist.setName(null);
}
list=this.touristService.findZiXunList(tourist);
}
catch(Exception e){

}
obj.put("rows", list);
obj.put("total", list.size());
return CommonResponse.JsonAjax(obj.toString());
}
@RequestMapping(params="method=toAddTourist")
public ModelAndView toAddTourist(HttpServletRequest request,HttpServletResponse response){
ModelAndView mav = new ModelAndView();
mav.setViewName("admin/zxinfoAdd");
return mav;
}
@RequestMapping(params="method=addTourist")
public ModelAndView addTourist(HttpServletRequest request,HttpServletResponse response,@ModelAttribute ZiXuninfo tourist){
response.setContentType("text/html;charset=utf-8");
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
		obj.put("statusCode", 201);
obj.put("title", "操作提示");
obj.put("message", "更新景点失败");
}
return CommonResponse.JsonAjax(obj.toString());
}
@RequestMapping(params="method=deleteTourist")
public ModelAndView deleteTourist(HttpServletRequest request,HttpServletResponse response,@ModelAttribute Tourist tourist){
response.setContentType("text/html;charset=utf-8");
JSONObject obj = new JSONObject();
try{
if(this.touristService.delete(tourist)){
obj.put("statusCode", 200);
obj.put("title", "操作提示");
obj.put("message", "恭喜你,操作成功");
}
else{
obj.put("statusCode", 201);
obj.put("title", "操作提示");
obj.put("message", "删除景点失败");
}
}
catch(Exception ex){
obj.put("statusCode", 201);
obj.put("title", "操作提示");
obj.put("message", "删除景点失败");
}
return CommonResponse.JsonAjax(obj.toString());
}
@RequestMapping(params="method=finProvinceList")
public ModelAndView finProvinceList(HttpServletRequest request,HttpServletResponse response){
response.setContentType("text/html;charset=utf-8");
List<Province> list = new ArrayList<Province>();
try{
list = this.provinceService.findProvinceList(new Province());
}
catch(Exception ex){

}
return CommonResponse.JsonAjax(JSONArray.fromObject(list).toString());
}
@RequestMapping(params="method=finCityList")
public ModelAndView finCityList(HttpServletRequest request,HttpServletResponse response){
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
}
@RequestMapping(params="method=toAddTourlistType")
public ModelAndView toAddTourlistType(HttpServletRequest request,HttpServletResponse response){
ModelAndView mav = new ModelAndView();
mav.setViewName("admin/typeAdd");
return mav;
}
@RequestMapping(params="method=addTouristType")
public ModelAndView addTouristType(HttpServletRequest request,HttpServletResponse response,@ModelAttribute TouristType type){
response.setContentType("text/html;charset=utf-8");
JSONObject obj = new JSONObject();
try{
this.touristTypeService.save(type);
obj.put("statusCode", 200);
obj.put("title", "操作提示");
obj.put("message", "恭喜你,添加景点类型成功");
}
catch(Exception ex){
obj.put("statusCode", 201);
obj.put("title", "操作提示");
obj.put("message", "添加景点类型失败");
}
return CommonResponse.JsonAjax(obj.toString());

}
@RequestMapping(params="method=toEditTouristType")
public ModelAndView toEditTouristType(HttpServletRequest request,HttpServletResponse response){
ModelAndView mav = new ModelAndView();
mav.setViewName("admin/typeEdit");
return mav;
}
@RequestMapping(params="method=findTouristType")
public ModelAndView findTouristType(HttpServletRequest request,HttpServletResponse response){
TouristType type = new TouristType();
try{
int id =Integer.valueOf(request.getParameter("id"));
TouristType bean = new TouristType();
bean.setId(id);
type=this.touristTypeService.findTouristType(bean);
}
catch(Exception e){

}
return CommonResponse.JsonAjax(JSONObject.fromObject(type).toString());
}
@RequestMapping(params="method=updateTouristType")
public ModelAndView updateTouristType(HttpServletRequest request,HttpServletResponse response,@ModelAttribute TouristType type){
JSONObject obj = new JSONObject();
try{
if(this.touristTypeService.update(type)){
obj.put("statusCode", 200);
obj.put("title", "操作提示");
obj.put("message", "恭喜你,操作成功");
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

@Controller
@RequestMapping("/user.do")
public class UserController {

@Autowired
private UserService userService;

@Autowired
private TouristService touristService;

@Autowired
private OrdersService ordersService;

@RequestMapping(params="method=getAllUser")
public ModelAndView getAllUser(HttpServletRequest request,HttpServletResponse reponse){


ModelAndView mav = new ModelAndView();
mav.setViewName("admin/allUser");
return mav;
}
@RequestMapping(params="method=checkAllUser")
public ModelAndView checkAllUser(HttpServletRequest request,HttpServletResponse reponse){


ModelAndView mav = new ModelAndView();
mav.setViewName("admin/checkUserList");
return mav;
}
@RequestMapping(params="method=getCheckUserData")
public ModelAndView getCheckUserData(HttpServletRequest request,HttpServletResponse response,@ModelAttribute User user){
List<User> findAll = new ArrayList<User>();
JSONObject obj = new JSONObject();
try{
if(user.getUsername()!=null&&StringUtils.isBlank(user.getUsername())){
user.setUsername(null);
}
user.setState(0);
findAll = userService.findAll(user);
}
catch(Exception e){

}
obj.put("rows", findAll);
obj.put("total", findAll.size());
return CommonResponse.JsonAjax(obj.toString());
}
@RequestMapping(params="method=getUserData")
public ModelAndView getUserData(HttpServletRequest request,HttpServletResponse response,@ModelAttribute User user){
List<User> findAll = new ArrayList<User>();


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