SpringBoot+Vue项目图书个性化推荐系统
创始人
2024-05-13 11:39:34
0

文末获取源码 

开发语言:Java

框架:springboot

JDK版本:JDK1.8

服务器:tomcat7

数据库:mysql 5.7/8.0

数据库工具:Navicat11

开发软件:eclipse/myeclipse/idea

Maven包:Maven3.3.9

浏览器:谷歌浏览器

一、前言介绍 

本文主要论述了如何使用JAVA语言开发一个图书个性化推荐系统,本系统将严格按照软件开发流程进行各个阶段的工作,采用BS架构,面向对象编程思想进行项目开发。在引言中,作者将论述图书个性化推荐系统的当前背景以及系统开发的目的,后续章节将严格按照软件开发流程,对系统进行各个阶段分析设计。

图书个性化推荐系统的主要使用者分为管理员和学生,实现功能包括管理员:首页、个人中心、学生管理、图书分类管理、图书信息管理、图书预约管理、退换图书管理、管理员管理、留言板管理、系统管理,学生:首页、个人中心、图书预约管理、退换图书管理、我的收藏管理,前台首页;首页、图书信息、好书推荐、留言反馈、个人中心、后台管理等功能。由于本系统的功能模块设计比较全面,所以使得整个图书个性化推荐系统信息管理的过程得以实现。

二、系统结构设计

整个系统是由多个功能模块组合而成的,要将所有的功能模块都一一列举出来,然后进行逐个的功能设计,使得每一个模块都有相对应的功能设计,然后进行系统整体的设计。 

本图书个性化推荐系统结构图如图

三、前台首页功能模块

3.1首页 

图书个性化推荐系统,在前台首页可以查看首页、图书信息、好书推荐、留言反馈、个人中心、后台管理等内容,如图

3.2图书信息

在图书信息页面通过查看图书编号、图书名称、图书类别、图片、作者、出版社、版次、数量、点击次数等信息进行预约、立即提交或点我收藏操作,如图

四、管理员模块

4.1首页

管理员登录进入图书个性化推荐系统可以查看首页、个人中心、学生管理、图书分类管理、图书信息管理、图书预约管理、退换图书管理、管理员管理、留言板管理、系统管理等信息。

4.2学生管理

在学生管理页面中可以通过查看学号、密码、学生姓名、性别、出生日期、联系电话、班级等内容进行修改、删除等操作,如图所示。还可以根据需要对图书分类管理进行修改或删除等详细操作,如图

4.3图书信息管理

在图书信息管理页面中可以查看图书编号、图书名称、图书类别、图片、作者、出版社、版次、数量等信息,并可根据需要对己有图书信息管理进行详情、预约、查看评论、修改或删除等操作,如图

4.4图书预约管理

在图书预约管理页面中可以查看图书编号、图书名称、图书类别、作者、出版社、版次、数量、学号、学生姓名、联系电话、申请日期、审核回复、审核信息等操作,如图

4.5退换图书管理

在退换图书管理页面中可以查看图书编号、图书名称、作者、出版社、版次、数量、学号、退换类型、退换原因、日期、审核回复、审核状态、审核等内容,并且根据需要对己有退换图书管理进行详情,修改或删除等详细操作,如图

4.6管理员管理

在管理员管理页面中可以查看用户名、密码、角色等内容,并且根据需要对已有管理员管理进行详情,修改或删除等详细操作,如图

五、学生功能模块

学生登录进入图书个性化推荐系统可以查看首页、个人中心、图书预约管理、退换图书管理、我的收藏管理等内容。

5.1个人信息

在个人信息页面中通过填写学号、密码、学生姓名、性别、出生日期、联系电话、班级等信息,还可以根据需要对个人信息进行修改等操作、如图

5.2图书预约管理

在图书预约管理页面中可以查看图书编号、图书名称、图书类别、作者、出版社、版次、数量、学号、学生姓名、联系电话、申请日期、审核回复、审核状态等信息内容,并且根据需要对已有图书预约管理进行详情、退换或删除等其他详细操作,如图

六、部分核心代码

/*** 上传文件映射表*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{@Autowiredprivate ConfigService configService;/*** 上传文件*/@RequestMapping("/upload")public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {if (file.isEmpty()) {throw new EIException("上传文件不能为空");}String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}String fileName = new Date().getTime()+"."+fileExt;File dest = new File(upload.getAbsolutePath()+"/"+fileName);file.transferTo(dest);/*** 如果使用idea或者eclipse重启项目,发现之前上传的图片或者文件丢失,将下面一行代码注释打开* 请将以下的"D:\\springbootq33sd\\src\\main\\resources\\static\\upload"替换成你本地项目的upload路径,* 并且项目路径不能存在中文、空格等特殊字符*/
//		FileUtils.copyFile(dest, new File("D:\\springbootq33sd\\src\\main\\resources\\static\\upload"+"/"+fileName)); /**修改了路径以后请将该行最前面的//注释去掉**/if(StringUtils.isNotBlank(type) && type.equals("1")) {ConfigEntity configEntity = configService.selectOne(new EntityWrapper().eq("name", "faceFile"));if(configEntity==null) {configEntity = new ConfigEntity();configEntity.setName("faceFile");configEntity.setValue(fileName);} else {configEntity.setValue(fileName);}configService.insertOrUpdate(configEntity);}return R.ok().put("file", fileName);}/*** 下载文件*/@IgnoreAuth@RequestMapping("/download")public ResponseEntity download(@RequestParam String fileName) {try {File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}File file = new File(upload.getAbsolutePath()+"/"+fileName);if(file.exists()){/*if(!fileService.canRead(file, SessionManager.getSessionUser())){getResponse().sendError(403);}*/HttpHeaders headers = new HttpHeaders();headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    headers.setContentDispositionFormData("attachment", fileName);    return new ResponseEntity(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);}} catch (IOException e) {e.printStackTrace();}return new ResponseEntity(HttpStatus.INTERNAL_SERVER_ERROR);}}
RestController
@RequestMapping("/kechengchengji")
public class KechengchengjiController {@Autowiredprivate KechengchengjiService kechengchengjiService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map params,KechengchengjiEntity kechengchengji,HttpServletRequest request){String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("jiaoshi")) {kechengchengji.setJiaoshizhanghao((String)request.getSession().getAttribute("username"));}if(tableName.equals("xuesheng")) {kechengchengji.setXuehao((String)request.getSession().getAttribute("username"));}EntityWrapper ew = new EntityWrapper();PageUtils page = kechengchengjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, kechengchengji), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map params,KechengchengjiEntity kechengchengji, HttpServletRequest request){EntityWrapper ew = new EntityWrapper();PageUtils page = kechengchengjiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, kechengchengji), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( KechengchengjiEntity kechengchengji){EntityWrapper ew = new EntityWrapper();ew.allEq(MPUtil.allEQMapPre( kechengchengji, "kechengchengji")); return R.ok().put("data", kechengchengjiService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(KechengchengjiEntity kechengchengji){EntityWrapper< KechengchengjiEntity> ew = new EntityWrapper< KechengchengjiEntity>();ew.allEq(MPUtil.allEQMapPre( kechengchengji, "kechengchengji")); KechengchengjiView kechengchengjiView =  kechengchengjiService.selectView(ew);return R.ok("查询课程成绩成功").put("data", kechengchengjiView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){KechengchengjiEntity kechengchengji = kechengchengjiService.selectById(id);return R.ok().put("data", kechengchengji);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){KechengchengjiEntity kechengchengji = kechengchengjiService.selectById(id);return R.ok().put("data", kechengchengji);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody KechengchengjiEntity kechengchengji, HttpServletRequest request){kechengchengji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(kechengchengji);kechengchengjiService.insert(kechengchengji);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody KechengchengjiEntity kechengchengji, HttpServletRequest request){kechengchengji.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(kechengchengji);kechengchengjiService.insert(kechengchengji);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody KechengchengjiEntity kechengchengji, HttpServletRequest request){//ValidatorUtils.validateEntity(kechengchengji);kechengchengjiService.updateById(kechengchengji);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){kechengchengjiService.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 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 wrapper = new EntityWrapper();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("jiaoshi")) {wrapper.eq("jiaoshizhanghao", (String)request.getSession().getAttribute("username"));}if(tableName.equals("xuesheng")) {wrapper.eq("xuehao", (String)request.getSession().getAttribute("username"));}int count = kechengchengjiService.selectCount(wrapper);return R.ok().put("count", count);}}

相关内容

热门资讯

常用商务英语口语   商务英语是以适应职场生活的语言要求为目的,内容涉及到商务活动的方方面面。下面是小编收集的常用商务...
六年级上册英语第一单元练习题   一、根据要求写单词。  1.dry(反义词)__________________  2.writ...
复活节英文怎么说 复活节英文怎么说?复活节的英语翻译是什么?复活节:Easter;"Easter,anniversar...
2008年北京奥运会主题曲 2008年北京奥运会(第29届夏季奥林匹克运动会),2008年8月8日到2008年8月24日在中华人...
英语道歉信 英语道歉信15篇  在日常生活中,道歉信的使用频率越来越高,通过道歉信,我们可以更好地解释事情发生的...
六年级英语专题训练(连词成句... 六年级英语专题训练(连词成句30题)  1. have,playhouse,many,I,toy,i...
上班迟到情况说明英语   每个人都或多或少的迟到过那么几次,因为各种原因,可能生病,可能因为交通堵车,可能是因为天气冷,有...
小学英语教学论文 小学英语教学论文范文  引导语:英语教育一直都是每个家长所器重的,那么有关小学英语教学论文要怎么写呢...
英语口语学习必看的方法技巧 英语口语学习必看的方法技巧如何才能说流利的英语? 说外语时,我们主要应做到四件事:理解、回答、提问、...
四级英语作文选:Birth ... 四级英语作文范文选:Birth controlSince the Chinese Governmen...
金融专业英语面试自我介绍 金融专业英语面试自我介绍3篇  金融专业的学生面试时,面试官要求用英语做自我介绍该怎么说。下面是小编...
我的李老师走了四年级英语日记... 我的李老师走了四年级英语日记带翻译  我上了五个学期的小学却换了六任老师,李老师是带我们班最长的语文...
小学三年级英语日记带翻译捡玉... 小学三年级英语日记带翻译捡玉米  今天,我和妈妈去外婆家,外婆家有刚剥的`玉米棒上带有玉米籽,好大的...
七年级英语优秀教学设计 七年级英语优秀教学设计  作为一位兢兢业业的人民教师,常常要写一份优秀的教学设计,教学设计是把教学原...
我的英语老师作文 我的英语老师作文(通用21篇)  在日常生活或是工作学习中,大家都有写作文的经历,对作文很是熟悉吧,...
英语老师教学经验总结 英语老师教学经验总结(通用19篇)  总结是指社会团体、企业单位和个人对某一阶段的学习、工作或其完成...
初一英语暑假作业答案 初一英语暑假作业答案  英语练习一(基础训练)第一题1.D2.H3.E4.F5.I6.A7.J8.C...
大学生的英语演讲稿 大学生的英语演讲稿范文(精选10篇)  使用正确的写作思路书写演讲稿会更加事半功倍。在现实社会中,越...
VOA美国之音英语学习网址 VOA美国之音英语学习推荐网址 美国之音网站已经成为语言学习最重要的资源站点,在互联网上还有若干网站...
商务英语期末试卷 Part I Term Translation (20%)Section A: Translate ...