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





基于javaweb的SSM游戏点评系统(java+ssm+jsp+javascript+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版本; 6.是否Maven项目:否;
技术栈
- 后端:Spring+SpringMVC+Mybatis 2. 前端:JSP+CSS+JavaScript+jQuery
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中springmvc-servlet.xml配置文件中的数据库配置改为自己的配置; 4. 运行项目,在浏览器中输入http://localhost:8080/ 登录 用户账号/密码: user/123456 管理员账号/密码:admin/admin
——————————CodeStart——————————
| 12
 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
 
 | 		String name = String.valueOf(VeDate.getStringDatex());String type = fileName.substring(i + 1);
 fileName = name + "." + type;
 File targetFile = new File(path, fileName);
 if (!targetFile.exists()) {
 targetFile.mkdirs();
 }
 
 
 try {
 file.transferTo(targetFile);
 } catch (Exception e) {
 e.printStackTrace();
 }
 model.addAttribute("imageFileName", fileName);
 return "saveimage";
 }
 
 @RequestMapping(value = "/files.action")
 public String files(@RequestParam(value = "image", required = false) MultipartFile file, HttpServletRequest request,
 ModelMap model) {
 String path = request.getSession().getServletContext().getRealPath("/") + "upfiles/";
 String fileName = file.getOriginalFilename();
 int i = fileName.lastIndexOf(".");
 String name = String.valueOf(VeDate.getStringDatex());
 String type = fileName.substring(i + 1);
 fileName = name + "." + type;
 File targetFile = new File(path, fileName);
 if (!targetFile.exists()) {
 targetFile.mkdirs();
 }
 
 
 try {
 file.transferTo(targetFile);
 } catch (Exception e) {
 e.printStackTrace();
 }
 model.addAttribute("imageFileName", fileName);
 return "savefile";
 }
 }
 package com.action;
 
 
 
 | 
| 12
 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
 
 | 	this.front();if (this.getSession().getAttribute("userid") == null) {
 return "redirect:/index/preLogin.action";
 }
 Orders orders = this.ordersService.getOrdersById(this.getRequest().getParameter("id"));
 orders.setStatus("已收货");
 this.ordersService.updateOrders(orders);
 return "redirect:/index/showOrders.action";
 }
 
 
 @RequestMapping("cancel.action")
 public String cancel(String id) {
 this.front();
 if (this.getSession().getAttribute("userid") == null) {
 return "redirect:/index/preLogin.action";
 }
 Orders orders = this.ordersService.getOrdersById(this.getRequest().getParameter("id"));
 orders.setStatus("已取消");
 this.ordersService.updateOrders(orders);
 return "redirect:/index/showOrders.action";
 }
 
 
 @RequestMapping("orderdetail.action")
 public String orderdetail(String id) {
 this.front();
 if (this.getSession().getAttribute("userid") == null) {
 return "redirect:/index/preLogin.action";
 }
 Details details = new Details();
 details.setOrdercode(id);
 List<Details> detailsList = this.detailsService.getDetailsByCond(details);
 this.getRequest().setAttribute("detailsList", detailsList);
 return "users/orderdetail";
 }
 
 
 @RequestMapping("cate.action")
 public String cate(String id, String number) {
 this.front();
 Jiancai goods = new Jiancai();
 goods.setCateid(id);
 List<Jiancai> flimList = new ArrayList<Jiancai>();
 List<Jiancai> tempList = this.jiancaiService.getJiancaiByCond(goods);
 int pageNumber = tempList.size();
 int maxPage = pageNumber;
 if (maxPage % 12 == 0) {
 maxPage = maxPage / 12;
 } else {
 maxPage = maxPage / 12 + 1;
 }
 
 | 
| 12
 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
 
 | package com.action;
 
 
 
 @Controller
 
 @RequestMapping(value = "/admin", produces = "text/plain;charset=utf-8")
 public class AdminAction extends BaseAction {
 
 @Autowired
 @Resource
 private AdminService adminService;
 
 
 @RequestMapping("login.action")
 public String login() {
 String username = this.getRequest().getParameter("username");
 String password = this.getRequest().getParameter("password");
 Admin adminEntity = new Admin();
 adminEntity.setUsername(username);
 List<Admin> adminlist = this.adminService.getAdminByCond(adminEntity);
 if (adminlist.size() == 0) {
 this.getRequest().setAttribute("message", "用户名不存在");
 return "admin/index";
 } else {
 Admin admin = adminlist.get(0);
 if (password.equals(admin.getPassword())) {
 this.getSession().setAttribute("adminid", admin.getAdminid());
 this.getSession().setAttribute("adminname", admin.getUsername());
 this.getSession().setAttribute("realname", admin.getRealname());
 } else {
 this.getRequest().setAttribute("message", "密码错误");
 return "admin/index";
 }
 }
 
 | 
| 12
 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
 
 | 	this.front();if (this.getSession().getAttribute("userid") == null) {
 return "redirect:/index/preLogin.action";
 }
 Details details = new Details();
 details.setOrdercode(id);
 List<Details> detailsList = this.detailsService.getDetailsByCond(details);
 this.getRequest().setAttribute("detailsList", detailsList);
 return "users/orderdetail";
 }
 
 
 @RequestMapping("cate.action")
 public String cate(String id, String number) {
 this.front();
 Jiancai goods = new Jiancai();
 goods.setCateid(id);
 List<Jiancai> flimList = new ArrayList<Jiancai>();
 List<Jiancai> tempList = this.jiancaiService.getJiancaiByCond(goods);
 int pageNumber = tempList.size();
 int maxPage = pageNumber;
 if (maxPage % 12 == 0) {
 maxPage = maxPage / 12;
 } else {
 maxPage = maxPage / 12 + 1;
 }
 if (number == null) {
 number = "0";
 }
 int start = Integer.parseInt(number) * 12;
 int over = (Integer.parseInt(number) + 1) * 12;
 int count = pageNumber - over;
 if (count <= 0) {
 over = pageNumber;
 }
 for (int i = start; i < over; i++) {
 Jiancai x = tempList.get(i);
 flimList.add(x);
 }
 String html = "";
 StringBuffer buffer = new StringBuffer();
 buffer.append("  共为");
 buffer.append(maxPage);
 buffer.append("页  共有");
 buffer.append(pageNumber);
 buffer.append("条  当前为第");
 buffer.append((Integer.parseInt(number) + 1));
 
 | 
| 12
 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
 
 | @Resourceprivate AdminService adminService;
 
 
 @RequestMapping("login.action")
 public String login() {
 String username = this.getRequest().getParameter("username");
 String password = this.getRequest().getParameter("password");
 Admin adminEntity = new Admin();
 adminEntity.setUsername(username);
 List<Admin> adminlist = this.adminService.getAdminByCond(adminEntity);
 if (adminlist.size() == 0) {
 this.getRequest().setAttribute("message", "用户名不存在");
 return "admin/index";
 } else {
 Admin admin = adminlist.get(0);
 if (password.equals(admin.getPassword())) {
 this.getSession().setAttribute("adminid", admin.getAdminid());
 this.getSession().setAttribute("adminname", admin.getUsername());
 this.getSession().setAttribute("realname", admin.getRealname());
 } else {
 this.getRequest().setAttribute("message", "密码错误");
 return "admin/index";
 }
 }
 return "admin/main";
 }
 
 
 @RequestMapping("editpwd.action")
 public String editpwd() {
 String adminid = (String) this.getSession().getAttribute("adminid");
 String password = this.getRequest().getParameter("password");
 String repassword = this.getRequest().getParameter("repassword");
 Admin admin = this.adminService.getAdminById(adminid);
 if (password.equals(admin.getPassword())) {
 admin.setPassword(repassword);
 this.adminService.updateAdmin(admin);
 } else {
 this.getRequest().setAttribute("message", "旧密码错误");
 
 | 
| 12
 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
 
 | 		request.setAttribute("html", html);request.setAttribute(name + "List", objList);
 }
 
 }
 package com.action;
 
 
 
 
 
 @Controller
 @RequestMapping("/upload")
 public class UploadAction {
 
 @RequestMapping(value = "/image.action")
 public String upload(@RequestParam(value = "image", required = false) MultipartFile file,
 HttpServletRequest request, ModelMap model) {
 String path = request.getSession().getServletContext().getRealPath("/") + "upfiles/";
 String fileName = file.getOriginalFilename();
 int i = fileName.lastIndexOf(".");
 String name = String.valueOf(VeDate.getStringDatex());
 String type = fileName.substring(i + 1);
 fileName = name + "." + type;
 File targetFile = new File(path, fileName);
 if (!targetFile.exists()) {
 targetFile.mkdirs();
 }
 
 
 try {
 file.transferTo(targetFile);
 } catch (Exception e) {
 e.printStackTrace();
 }
 model.addAttribute("imageFileName", fileName);
 return "saveimage";
 }
 
 @RequestMapping(value = "/files.action")
 
 | 
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=111422292105200em
https://javayms.pages.dev?id=111422292105200em