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);}}

相关内容

热门资讯

大理导游词 大理导游词范文(精选8篇)  作为一位不辞辛劳的导游,就难以避免地要准备导游词,导游词可以加深游客对...
四川导游词节选 四川导游词节选  四川,简称为“蜀”,历史悠久。在古代称为巴蜀,是古代巴人和蜀人的发祥地,这片土地孕...
鸟的天堂导游词 鸟的天堂导游词精选15篇  作为一名专门为游客提供优质服务的导游人员,编写导游词是必不可少的,导游词...
韶关南雄梅关古道导游词 韶关南雄梅关古道导游词  各位游客,大家好!我是**旅行社的导游,大家可以叫我**,韶关南雄梅关古道...
上海宋庆龄故居导游词 上海宋庆龄故居导游词  作为一名优秀的旅游从业人员,就不得不需要编写导游词,导游词具有极强的实用性,...
白果树瀑布导游词 白果树瀑布导游词3篇  作为一名优秀的旅游从业人员,常常要写一份好的导游词,导游词是导游员进行实地口...
沈阳张氏帅府导游词 沈阳张氏帅府导游词  作为一名具备丰富知识的导游,就有可能用到导游词,导游词是我们引导游览时使用的讲...
永安桃源洞的导游词 永安桃源洞的导游词各位远道而来的朋友:  一路辛苦了,欢迎你们!我来自三明市明运旅行社,姓张名红鹰,...
青山地质公园的导游词 青山地质公园的导游词  导语:青山之景实在数不胜数,青山之美也实在美不胜收。以下是小编为大家整理分享...
三峡大坝导游词 三峡大坝导游词(精选7篇)  作为一名具备丰富知识的导游,通常会被要求编写导游词,导游词不是以一代百...
游苏州导游词 游苏州导游词  夜读苏州诗,襟怀尽冰雪。下面是小编整理的游苏州导游词,希望对你有所帮助!  篇一:游...
党家村的导游词 党家村的导游词范文  距今已逾600年的韩城党家村古建筑村落已被列入“国际传统居民研究项目”中,陕西...
柯岩风景区导游词 柯岩风景区导游词  作为一名乐于为游客排忧解难的导游,常常需要准备导游词,导游词一般是根据实际的游览...
临海古长城导游词 临海古长城导游词  作为一名默默奉献的导游,通常会被要求编写导游词,导游词可以加深游客对景点的印象,...
龙津风雨桥导游词 龙津风雨桥导游词  龙津风雨桥位于湖南省芷江县,是一座历史久远的桥梁,以下是小编整理的龙津风雨桥导游...
杭州黄龙洞导游词讲解 杭州黄龙洞导游词讲解  黄龙洞位于湖南省张家界市核心景区武陵源风景名胜区内,是世界自然遗产、世界地质...
峨眉山猴山导游词 峨眉山猴山导游词(通用11篇)  作为一名乐于助人的导游,总不可避免地需要编写导游词,借助导游词可以...
乌镇东栅导游词详细版 乌镇东栅导游词详细版  乌镇是一块古老神奇而又美丽非凡的土地,是一个有1300年建镇史的江南水乡古镇...
著名导游词 著名导游词范文  导游词是导游人员引导游客观光游览时的讲解词,是导游员同游客交流思想,向游客传播文化...