大家好!我是职场程序猿,感谢您阅读本文,欢迎一键三连哦。
💞当前专栏:Java毕业设计
精彩专栏推荐👇🏻👇🏻👇🏻
开发环境
开发语言:Java
框架:springboot
JDK版本:JDK1.8
服务器:tomcat7
数据库:mysql 5.7
数据库工具:Navicat12
开发软件:eclipse/myeclipse/idea
Maven包:Maven3.3.9
浏览器:谷歌浏览器
演示视频
jspssm541springboot心灵心理健康
源码下载地址:
https://download.csdn.net/download/m0_46388260/87987350
论文目录
【如需全文请按文末获取联系】
目录
一、项目简介
心灵治愈交流平台的主要使用者分为管理员和用户、心理咨询师,实现功能包括管理员:首页、个人中心、系统公告管理、用户管理、心理咨询师管理、心灵专栏管理、压力测试管理、测试数据管理、咨询师预约管理、小纸条管理、系统管理,用户:首页、个人中心、测试数据管理、咨询师预约管理、小纸条管理,心理咨询师;首页、个人中心、咨询师预约管理、系统管理,前台首页;首页、系统公告、心理咨询师、心灵专栏、压力测试、小纸条、个人中心、后台管理、聊天等功能。由于本网站的功能模块设计比较全面,所以使得整个心灵治愈交流平台信息管理的过程得以实现。
本系统的使用可以实现本心灵治愈交流平台管理的信息化,可以方便管理员进行更加方便快捷的管理,可以提高管理人员的工作效率。
二、系统设计
2.1软件功能模块设计
本心灵治愈交流平台主要包括三大功能模块,即用户功能模块、心理咨询师功能模块和管理员功能模块。
(1)管理员模块:系统中的核心用户是管理员,管理员登录后,通过管理员来管理后台系统。主要功能有:首页、个人中心、系统公告管理、用户管理、心理咨询师管理、心灵专栏管理、压力测试管理、测试数据管理、咨询师预约管理、小纸条管理、系统管理等功能。管理员用例图如图3-1所示。
(2)用户:首页、个人中心、测试数据管理、咨询师预约管理、小纸条管理等功能,用户如图3-2所示。
(3)心理咨询师:首页、个人中心、咨询师预约管理、系统管理等功能,心理咨询师如图3-3所示。
2.2数据库设计
1、心灵专栏管理实体图如图4-5所示:
2、咨询师预约管理实体图如图4-6所示:
3、用户管理实体图如图4-7所示:
三、系统项目部分截图
3.1前台首页功能模块
心灵治愈交流平台 ,在系统首页可以查看首页、系统公告、心理咨询师、心灵专栏、压力测试、小纸条、个人中心、后台管理、聊天等内容,如图5-1所示。
3.2管理员功能模块
管理员登录进入心灵治愈交流平台可以查看首页、个人中心、系统公告管理、用户管理、心理咨询师管理、心灵专栏管理、压力测试管理、测试数据管理、咨询师预约管理、小纸条管理、系统管理等信息。
系统公告管理,在系统公告管理页面中可以通过填写标题、公告类型、发布时间、发布人、图片等内容进行修改、添加,如图5-6所示。还可以根据需要对用户管理进行添加,修改或删除等详细操作,如图5-7所示。
3.3用户功能模块
用户登录进入心灵治愈交流平台可以查看首页、个人中心、测试数据管理、咨询师预约管理、小纸条管理等内容。
个人信息,在个人信息页面中通过填写用户名、密码、用户姓名、性别、头像、手机、邮箱等信息,还可以根据需要对个人信息进行修改、删除如图5-14所示。
3.4心理咨询师功能模块
心理咨询师登录进入心灵治愈交流平台可以查看首页、个人中心、咨询师预约管理、系统管理等内容。
个人信息,在个人信息页面中通过填写咨询师账号、密码、咨询师姓名、性别、年龄、资格证书、地址、手机号、照片等信息,还可以根据需要对个人信息进行修改、删除如图5-18所示。
四、部分核心代码
4.1 File部分
package com.controller;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.ResourceUtils;
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 org.springframework.web.multipart.MultipartFile;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;
/**
* 上传文件映射表
*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
@Autowired
private 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);
if(StringUtils.isNotBlank(type) && type.equals("1")) {
ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().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<byte[]> 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<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
}
} catch (IOException e) {
e.printStackTrace();
}
return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}
获取源码或论文
如需对应的论文或源码,也可以下方微信联系我