项目编号:BS-XX-197
一,环境介绍
语言环境:Java: jdk1.8
数据库:Mysql: mysql5.7
应用服务器:Tomcat: tomcat8.5.31
开发工具:IDEA或eclipse
开发技术:springboot+Vue
二,项目简介
本项目基于Springboot+Vue开发实现了一个游戏攻略分享平台。用户注册登录后可以在线发表游戏攻略秘籍,查看分享信息,公告信息,管理个人信息,可以在线反馈,评论,收藏,发私信等相关操作。后台管理员可以在后台管理用户信息、游戏分类信息、游戏秘籍信息、公告信息、反馈信息、私信信息、轮播图信息、推荐信息等。系统功能完整,界面美观,人机交互方便。
三,系统展示
前台功能
文章信息浏览
公告信息
用户注册
用户登录
个人管理
个人发表的文章信息
反馈
私聊
后台管理
四,核心代码展示
package com.controller; import java.util.Arrays; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; 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.annotation.IgnoreAuth; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.entity.ConfigEntity; import com.service.ConfigService; import com.utils.MPUtil; import com.utils.PageUtils; import com.utils.R; import com.utils.ValidatorUtils; /** * 登录相关 */ @RequestMapping("config") @RestController public class ConfigController{ @Autowired private ConfigService configService; /** * 列表 */ @RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,ConfigEntity config){ EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>(); PageUtils page = configService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, config), params), params)); return R.ok().put("data", page); } /** * 列表 */ @IgnoreAuth @RequestMapping("/list") public R list(@RequestParam Map<String, Object> params,ConfigEntity config){ EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>(); PageUtils page = configService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, config), params), params)); return R.ok().put("data", page); } /** * 信息 */ @RequestMapping("/info/{id}") public R info(@PathVariable("id") String id){ ConfigEntity config = configService.selectById(id); return R.ok().put("data", config); } /** * 详情 */ @IgnoreAuth @RequestMapping("/detail/{id}") public R detail(@PathVariable("id") String id){ ConfigEntity config = configService.selectById(id); return R.ok().put("data", config); } /** * 根据name获取信息 */ @RequestMapping("/info") public R infoByName(@RequestParam String name){ ConfigEntity config = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile")); return R.ok().put("data", config); } /** * 保存 */ @PostMapping("/save") public R save(@RequestBody ConfigEntity config){ // ValidatorUtils.validateEntity(config); configService.insert(config); return R.ok(); } /** * 修改 */ @RequestMapping("/update") public R update(@RequestBody ConfigEntity config){ // ValidatorUtils.validateEntity(config); configService.updateById(config);//全部更新 return R.ok(); } /** * 删除 */ @RequestMapping("/delete") public R delete(@RequestBody Long[] ids){ configService.deleteBatchIds(Arrays.asList(ids)); return R.ok(); } }
package com.controller; import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.text.ParseException; 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.transaction.annotation.Transactional; import org.springframework.format.annotation.DateTimeFormat; 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.YouxifenleiEntity; import com.entity.view.YouxifenleiView; import com.service.YouxifenleiService; import com.service.TokenService; import com.utils.PageUtils; import com.utils.R; import com.utils.MD5Util; import com.utils.MPUtil; import com.utils.CommonUtil; import java.io.IOException; /** * 游戏分类 * 后端接口 * @author * @email * @date 2023-04-02 22:12:50 */ @RestController @RequestMapping("/youxifenlei") public class YouxifenleiController { @Autowired private YouxifenleiService youxifenleiService; /** * 后端列表 */ @RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,YouxifenleiEntity youxifenlei, HttpServletRequest request){ EntityWrapper<YouxifenleiEntity> ew = new EntityWrapper<YouxifenleiEntity>(); PageUtils page = youxifenleiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, youxifenlei), params), params)); return R.ok().put("data", page); } /** * 前端列表 */ @IgnoreAuth @RequestMapping("/list") public R list(@RequestParam Map<String, Object> params,YouxifenleiEntity youxifenlei, HttpServletRequest request){ EntityWrapper<YouxifenleiEntity> ew = new EntityWrapper<YouxifenleiEntity>(); PageUtils page = youxifenleiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, youxifenlei), params), params)); return R.ok().put("data", page); } /** * 列表 */ @RequestMapping("/lists") public R list( YouxifenleiEntity youxifenlei){ EntityWrapper<YouxifenleiEntity> ew = new EntityWrapper<YouxifenleiEntity>(); ew.allEq(MPUtil.allEQMapPre( youxifenlei, "youxifenlei")); return R.ok().put("data", youxifenleiService.selectListView(ew)); } /** * 查询 */ @RequestMapping("/query") public R query(YouxifenleiEntity youxifenlei){ EntityWrapper< YouxifenleiEntity> ew = new EntityWrapper< YouxifenleiEntity>(); ew.allEq(MPUtil.allEQMapPre( youxifenlei, "youxifenlei")); YouxifenleiView youxifenleiView = youxifenleiService.selectView(ew); return R.ok("查询游戏分类成功").put("data", youxifenleiView); } /** * 后端详情 */ @RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ YouxifenleiEntity youxifenlei = youxifenleiService.selectById(id); return R.ok().put("data", youxifenlei); } /** * 前端详情 */ @IgnoreAuth @RequestMapping("/detail/{id}") public R detail(@PathVariable("id") Long id){ YouxifenleiEntity youxifenlei = youxifenleiService.selectById(id); return R.ok().put("data", youxifenlei); } /** * 后端保存 */ @RequestMapping("/save") public R save(@RequestBody YouxifenleiEntity youxifenlei, HttpServletRequest request){ youxifenlei.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); //ValidatorUtils.validateEntity(youxifenlei); youxifenleiService.insert(youxifenlei); return R.ok(); } /** * 前端保存 */ @RequestMapping("/add") public R add(@RequestBody YouxifenleiEntity youxifenlei, HttpServletRequest request){ youxifenlei.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue()); //ValidatorUtils.validateEntity(youxifenlei); youxifenleiService.insert(youxifenlei); return R.ok(); } /** * 修改 */ @RequestMapping("/update") @Transactional public R update(@RequestBody YouxifenleiEntity youxifenlei, HttpServletRequest request){ //ValidatorUtils.validateEntity(youxifenlei); youxifenleiService.updateById(youxifenlei);//全部更新 return R.ok(); } /** * 删除 */ @RequestMapping("/delete") public R delete(@RequestBody Long[] ids){ youxifenleiService.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<YouxifenleiEntity> wrapper = new EntityWrapper<YouxifenleiEntity>(); if(map.get("remindstart")!=null) { wrapper.ge(columnName, map.get("remindstart")); } if(map.get("remindend")!=null) { wrapper.le(columnName, map.get("remindend")); } int count = youxifenleiService.selectCount(wrapper); return R.ok().put("count", count); } }
五,相关作品展示
基于Java开发、Python开发、PHP开发、C#开发等相关语言开发的实战项目
基于Nodejs、Vue等前端技术开发的前端实战项目
基于微信小程序和安卓APP应用开发的相关作品
基于51单片机等嵌入式物联网开发应用
基于各类算法实现的AI智能应用
基于大数据实现的各类数据管理和推荐系统