ssm+vue游戏攻略网站源码和论文

ssm+vue游戏攻略网站源码和论文052

 开发工具:idea 
 数据库mysql5.7+
 数据库链接工具:navcat,小海豚等
  技术:ssm

一、主要内容和基本要求

游戏攻略网站分为管理员与用户两种角色。

管理员的功能包括登录,用户管理,游戏分类管理,游戏攻略管理,游戏资讯管理等。

登录功能:管理员需要登录进入系统后台。

用户管理:实现用户信息的查询,修改,删除,用户禁言,取消禁言等操作,禁言的用户不能参与游戏攻略的评论操作。

游戏分类管理:实现游戏分类信息的增删改操作。

游戏攻略管理:实现游戏攻略信息的增删改查操作,可以查看用户对游戏攻略的评论。

游戏资讯管理:实现游戏资讯信息的增删改查操作。

用户的功能包括注册登录,游戏攻略,游戏资讯,修改个人信息,我的收藏等功能。

注册登录:用户需要先注册,再登录系统进入系统前台。

游戏攻略:用户查看游戏攻略信息,可以下载游戏攻略文件,可以收藏游戏攻略,可以评论游戏攻略,用户也能发布游戏攻略信息让其他人查看。

游戏资讯:用户查询查看游戏资讯信息。

修改个人信息:用户对个人资料进行查看和修改。

我的收藏:用户查看已经收藏的游戏攻略信息。

游戏攻略网站是属于JavaWeb项目,采用的开发框架为SSM框架,也就是Spring mvc、Spring、MyBatis这三个框架,页面设计用的是jsp技术作为动态页面文件设计,jsp文件里可以对实现html等界面布局的代码,采用SpringMVC替代传统的struts2框架,主要对jsp访问的拦截和控制,Spring作为整个控制的核心,通过控制反转技术和面向切面技术,让Spring自动对使用的类文件进行调用和导入,MyBatis主要作为底层操作数据库,不牵扯业务逻辑,开发工具采用MyEclipse,服务器用的是tomcat。编码语言是Java,数据库采用Mysql。

package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.YouxigonglueEntity;
import com.entity.view.YouxigonglueView;import com.service.YouxigonglueService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 游戏攻略* 后端接口* @author * @email * @date 2021-02-22 15:48:18*/
@RestController
@RequestMapping("/youxigonglue")
public class YouxigonglueController {@Autowiredprivate YouxigonglueService youxigonglueService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,YouxigonglueEntity youxigonglue, HttpServletRequest request){EntityWrapper<YouxigonglueEntity> ew = new EntityWrapper<YouxigonglueEntity>();PageUtils page = youxigonglueService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, youxigonglue), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,YouxigonglueEntity youxigonglue, HttpServletRequest request){EntityWrapper<YouxigonglueEntity> ew = new EntityWrapper<YouxigonglueEntity>();PageUtils page = youxigonglueService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, youxigonglue), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( YouxigonglueEntity youxigonglue){EntityWrapper<YouxigonglueEntity> ew = new EntityWrapper<YouxigonglueEntity>();ew.allEq(MPUtil.allEQMapPre( youxigonglue, "youxigonglue")); return R.ok().put("data", youxigonglueService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(YouxigonglueEntity youxigonglue){EntityWrapper< YouxigonglueEntity> ew = new EntityWrapper< YouxigonglueEntity>();ew.allEq(MPUtil.allEQMapPre( youxigonglue, "youxigonglue")); YouxigonglueView youxigonglueView =  youxigonglueService.selectView(ew);return R.ok("查询游戏攻略成功").put("data", youxigonglueView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){YouxigonglueEntity youxigonglue = youxigonglueService.selectById(id);youxigonglue.setClicknum(youxigonglue.getClicknum()+1);youxigonglue.setClicktime(new Date());youxigonglueService.updateById(youxigonglue);return R.ok().put("data", youxigonglue);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){YouxigonglueEntity youxigonglue = youxigonglueService.selectById(id);youxigonglue.setClicknum(youxigonglue.getClicknum()+1);youxigonglue.setClicktime(new Date());youxigonglueService.updateById(youxigonglue);return R.ok().put("data", youxigonglue);}/*** 赞或踩*/@RequestMapping("/thumbsup/{id}")public R thumbsup(@PathVariable("id") String id,String type){YouxigonglueEntity youxigonglue = youxigonglueService.selectById(id);if(type.equals("1")) {youxigonglue.setThumbsupnum(youxigonglue.getThumbsupnum()+1);} else {youxigonglue.setCrazilynum(youxigonglue.getCrazilynum()+1);}youxigonglueService.updateById(youxigonglue);return R.ok();}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody YouxigonglueEntity youxigonglue, HttpServletRequest request){youxigonglue.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(youxigonglue);youxigonglueService.insert(youxigonglue);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody YouxigonglueEntity youxigonglue, HttpServletRequest request){youxigonglue.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(youxigonglue);youxigonglueService.insert(youxigonglue);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody YouxigonglueEntity youxigonglue, HttpServletRequest request){//ValidatorUtils.validateEntity(youxigonglue);youxigonglueService.updateById(youxigonglue);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){youxigonglueService.deleteBatchIds(Arrays.asList(ids));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<YouxigonglueEntity> wrapper = new EntityWrapper<YouxigonglueEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = youxigonglueService.selectCount(wrapper);return R.ok().put("count", count);}/*** 前端智能排序*/@IgnoreAuth@RequestMapping("/autoSort")public R autoSort(@RequestParam Map<String, Object> params,YouxigonglueEntity youxigonglue, HttpServletRequest request,String pre){EntityWrapper<YouxigonglueEntity> ew = new EntityWrapper<YouxigonglueEntity>();Map<String, Object> newMap = new HashMap<String, Object>();Map<String, Object> param = new HashMap<String, Object>();Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();while (it.hasNext()) {Map.Entry<String, Object> entry = it.next();String key = entry.getKey();String newKey = entry.getKey();if (pre.endsWith(".")) {newMap.put(pre + newKey, entry.getValue());} else if (StringUtils.isEmpty(pre)) {newMap.put(newKey, entry.getValue());} else {newMap.put(pre + "." + newKey, entry.getValue());}}params.put("sort", "clicknum");params.put("order", "desc");PageUtils page = youxigonglueService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, youxigonglue), params), params));return R.ok().put("data", page);}}

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/87789.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

AtCoder Beginner Contest 317(D-G)

D - President (atcoder.jp) &#xff08;1&#xff09;题目大意 &#xff08;2&#xff09;解题思路 考虑到z最大不超过1e5&#xff0c;N最多不超过100&#xff0c;因此可以考虑用背包来写&#xff0c;dp[j]表示拿高桥拿j分最少需要花费多少个选民转换&#xff0c;最后把答案取…

二级MySQL(二)——编程语言,函数

SQL语言又称为【结构化查询语言】 请使用FLOOR&#xff08;x&#xff09;函数求小于或等于5.6的最大整数 请使用TRUNCATE&#xff08;x&#xff0c;y&#xff09;函数将数字1.98752895保留到小数点后4位 请使用UPPER&#xff08;&#xff09;函数将字符串‘welcome’转化为大写…

android framework之Applicataion启动流程分析

Application启动流程分析 启动方式一&#xff1a;通过Launcher启动app 启动方式二&#xff1a;在某一个app里启动第二个app的Activity. 以上两种方式均可触发app进程的启动。但无论哪种方式&#xff0c;最终通过通过调用AMS的startActivity()来启动application的。 根据上图…

【算法与数据结构】513、LeetCode找树左下角的值

文章目录 一、题目二、解法三、完整代码 所有的LeetCode题解索引&#xff0c;可以看这篇文章——【算法和数据结构】LeetCode题解。 一、题目 二、解法 思路分析&#xff1a;这道题用层序遍历来做比较简单&#xff0c;最底层最左边节点就是层序遍历当中最底层元素容器的第一个值…

Java单元测试 JUnit 5 快速上手

一、背景 什么是 JUnit 5&#xff1f;首先就得聊下 Java 单元测试框架 JUnit&#xff0c;它与另一个框架 TestNG 占据了 Java领域里单元测试框架的主要市场&#xff0c;其中 JUnit 有着较长的发展历史和不断演进的丰富功能&#xff0c;备受大多数 Java 开发者的青睐。 而说到…

浅析三维模型OBJ格式轻量化压缩集群处理方法

浅析三维模型OBJ格式轻量化压缩集群处理方法 三维模型的OBJ格式轻量化压缩是指通过一系列技术和方法将三维模型的文件大小进一步减小&#xff0c;以提高模型在计算机中的加载、传输和存储效率。集群处理技术是指利用多台计算机构成的集群来并行处理任务&#xff0c;以加速计算过…

Nginx详解 二:配置文件部分

文章目录 1. Nginx 配置文件1.1 主配置文件1.2 子配置文件1.3 全局配置1.3.1 修改启动的进程数1.3.2 cpu和work进程绑定&#xff08;nginx调优&#xff09;1.3.3 修改PID路径1.3.4 nginx进程的优先级&#xff08;work进程的优先级&#xff09;1.3.5 调试work进程打开的文件的个…

MySQL概述,架构原理

一.MySQL简介 MySQL是一个关系型数据库管理系统&#xff0c;由瑞典的MySQL AB公司开发&#xff0c;后被oracle公司收购&#xff0c;MySQL是当下最流行的关系型数据库管理系统之一&#xff0c;在WEB应用方面&#xff0c;MySQL是最好的RDBMS&#xff08;Relational Database Man…

Android中的APK打包与安全

aapt2命令行实现apk打包 apk文件结构 classes.dex&#xff1a;Dex&#xff0c;即Android Dalvik执行文件 AndroidManifest.xml&#xff1a;工程中AndroidManifest.xml编译后得到的二进制xml文件 META-INF&#xff1a;主要保存各个资源文件的SHA1 hash值&#xff0c;用于校验…

浙大陈越何钦铭数据结构07-图6 旅游规划

题目: 有了一张自驾旅游路线图&#xff0c;你会知道城市间的高速公路长度、以及该公路要收取的过路费。现在需要你写一个程序&#xff0c;帮助前来咨询的游客找一条出发地和目的地之间的最短路径。如果有若干条路径都是最短的&#xff0c;那么需要输出最便宜的一条路径。 输入…

数据结构之单链表java实现

基本概念 链表是一种物理存储结构上非连续、非顺序的存储结构&#xff0c;数据元素的逻辑顺序是通过链表中指针链接次序实现的。和数组相比较&#xff0c;链表不需要指定大小&#xff0c;也不需要连续的地址。 单链表的基本设计思维是&#xff0c;利用结构体的设置&#xff0c…

javacv基础02-调用本机摄像头并预览摄像头图像画面视频

引入架包&#xff1a; <dependency><groupId>org.openpnp</groupId><artifactId>opencv</artifactId><version>4.5.5-1</version></dependency><dependency><groupId>org.bytedeco</groupId><artifactId…