精彩专栏推荐订阅:在 下方专栏👇🏻👇🏻👇🏻👇🏻
💖🔥作者主页:计算机毕设木哥🔥 💖
一、项目介绍
随着科技的发展和互联网的普及,游戏已经成为人们日常生活中的重要一部分。在游戏市场日益繁荣的背景下,如何为用户推荐合适的游戏并提高用户体验,成为了摆在游戏推荐系统面前的重要任务。本文将详细探讨游戏推荐系统的设计,以管理员和用户两个主要角色为出发点,明确他们的功能和职责。
二、项目功能介绍
管理员功能概述
个人中心:管理员可以在个人中心查看和编辑自己的个人信息,例如头像、用户名、密码等。
用户管理:管理员可以查看、添加、编辑和删除用户信息,例如用户名、密码、邮箱等。
科普知识管理:管理员可以添加、编辑和删除科普知识内容,例如游戏技巧、攻略等。
游戏攻路管理:管理员可以添加、编辑和删除游戏攻略,为玩家提供游戏帮助。
游戏信息管理:管理员可以添加、编辑和删除游戏信息,例如游戏简介、游戏类型等。
浙类型管理:管理员可以添加、编辑和删除游戏类型,例如角色扮演、动作冒险等。
游戏订单管理:管理员可以查看和管理用户的游戏订单。
游戏发货管理:管理员负责处理和跟踪游戏发货情况。
系统管理:管理员可以进行系统设置、权限管理等操作,保证系统的稳定运行。
用户功能概述
注册和登录:用户可以使用手机号、邮箱等进行注册和登录。
个人中心:用户可以在个人中心查看和编辑自己的个人信息,例如头像、用户名、密码等。
游戏攻略:用户可以查看和学习管理员发布的游戏攻略。
游戏信息:用户可以查看游戏的详细信息,例如游戏简介、游戏类型等。
游戏资讯:用户可以了解最新的游戏资讯和行业动态。
游戏订单管理:用户可以查看和管理自己的游戏订单。
我的收藏:用户可以查看和管理自己的收藏夹,例如收藏的游戏、攻略等。
三、开发环境
- 开发语言:Java
- 数据库:MySQL
- 系统架构:B/S
- 后端:springboot(Spring+SpringMVC+Mybatis)
- 前端:Vue
- 工具:IDEA或者Eclipse、JDK1.8、Maven
四、项目展示
注册登录页面:
首页模块:
管理员模块:
用户模块:
五、代码展示
public class ChatController {
@Autowired
private ChatService chatService;
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ChatEntity chat,
HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
chat.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<ChatEntity> ew = new EntityWrapper<ChatEntity>();
PageUtils page = chatService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chat), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ChatEntity chat,
HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
chat.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<ChatEntity> ew = new EntityWrapper<ChatEntity>();
PageUtils page = chatService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chat), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( ChatEntity chat){
EntityWrapper<ChatEntity> ew = new EntityWrapper<ChatEntity>();
ew.allEq(MPUtil.allEQMapPre( chat, "chat"));
return R.ok().put("data", chatService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(ChatEntity chat){
EntityWrapper< ChatEntity> ew = new EntityWrapper< ChatEntity>();
ew.allEq(MPUtil.allEQMapPre( chat, "chat"));
ChatView chatView = chatService.selectView(ew);
return R.ok("查询在线客服成功").put("data", chatView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ChatEntity chat = chatService.selectById(id);
return R.ok().put("data", chat);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ChatEntity chat = chatService.selectById(id);
return R.ok().put("data", chat);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ChatEntity chat, HttpServletRequest request){
chat.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chat);
if(StringUtils.isNotBlank(chat.getAsk())) {
chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", request.getSession().getAttribute("userId")));
chat.setUserid((Long)request.getSession().getAttribute("userId"));
chat.setIsreply(1);
}
if(StringUtils.isNotBlank(chat.getReply())) {
chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", chat.getUserid()));
chat.setAdminid((Long)request.getSession().getAttribute("userId"));
}
chatService.insert(chat);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ChatEntity chat, HttpServletRequest request){
chat.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chat);
chat.setUserid((Long)request.getSession().getAttribute("userId"));
if(StringUtils.isNotBlank(chat.getAsk())) {
chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", request.getSession().getAttribute("userId")));
chat.setUserid((Long)request.getSession().getAttribute("userId"));
chat.setIsreply(1);
}
if(StringUtils.isNotBlank(chat.getReply())) {
chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", chat.getUserid()));
chat.setAdminid((Long)request.getSession().getAttribute("userId"));
}
chatService.insert(chat);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody ChatEntity chat, HttpServletRequest request){
//ValidatorUtils.validateEntity(chat);
chatService.updateById(chat);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
chatService.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<ChatEntity> wrapper = new EntityWrapper<ChatEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = chatService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
六、项目总结
本文通过对游戏推荐系统中管理员和用户功能的详细阐述,揭示了游戏推荐系统的主要构成和运作方式。在互联网游戏日益繁荣的今天,一个好的游戏推荐系统不仅可以提高用户的游戏体验,也可以帮助管理员更好地管理游戏资源和用户信息。通过不断优化和完善系统功能,我们可以期待游戏推荐系统在未来的发展中发挥更大的作用,为人们带来更多优质的娱乐体验。