视频演示
<iframe allowfullscreen="true" data-mediaembed="bilibili" frameborder="0" id="3rSGiyTU-1716823330584" src="https://player.bilibili.com/player.html?aid=1205154867"></iframe>基于Springboot的图书个性化推荐系统 计算机毕业设计
前言
图书个性化推荐系统的主要使用者分为管理员和学生,实现功能包括:
管理员:首页、个人中心、学生管理、图书分类管理、图书信息管理、图书预约管理、退换图书管理、管理员管理、留言板管理、系统管理
学生:首页、个人中心、图书预约管理、退换图书管理、我的收藏管理,前台首页;首页、图书信息、好书推荐、留言反馈、个人中心、后台管理等功能。
网站首页
图书预约页面
个人中心页面
后台管理页面
编辑图书页面
用户登录代码
/**
* 登录
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", username));
if(user==null || !user.getMima().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(user.getId(), username,"yonghu", "用户" );
return R.ok().put("token", token);
}
图书分类代码
@RequestMapping("/query")
public R query(TushufenleiEntity tushufenlei){
EntityWrapper< TushufenleiEntity> ew = new EntityWrapper< TushufenleiEntity>();
ew.allEq(MPUtil.allEQMapPre( tushufenlei, "tushufenlei"));
TushufenleiView tushufenleiView = tushufenleiService.selectView(ew);
return R.ok("查询图书分类成功").put("data", tushufenleiView);
}
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
TushufenleiEntity tushufenlei = tushufenleiService.selectById(id);
return R.ok().put("data", tushufenlei);
}
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
TushufenleiEntity tushufenlei = tushufenleiService.selectById(id);
return R.ok().put("data", tushufenlei);
}
图书信息代码
@RequestMapping("/thumbsup/{id}")
public R vote(@PathVariable("id") String id,String type){
TushuxinxiEntity tushuxinxi = tushuxinxiService.selectById(id);
if(type.equals("1")) {
tushuxinxi.setThumbsupnum(tushuxinxi.getThumbsupnum()+1);
} else {
tushuxinxi.setCrazilynum(tushuxinxi.getCrazilynum()+1);
}
tushuxinxiService.updateById(tushuxinxi);
return R.ok("投票成功");
}
@RequestMapping("/save")
public R save(@RequestBody TushuxinxiEntity tushuxinxi, HttpServletRequest request){
tushuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(tushuxinxi);
tushuxinxiService.insert(tushuxinxi);
return R.ok();
}
@RequestMapping("/add")
public R add(@RequestBody TushuxinxiEntity tushuxinxi, HttpServletRequest request){
tushuxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(tushuxinxi);
tushuxinxiService.insert(tushuxinxi);
return R.ok();
}
标签:return,Springboot,public,tushufenlei,tushuxinxi,图书,毕业设计,id,个性化
From: https://blog.csdn.net/qq_43402143/article/details/139249992