基于JAVA+SpringMVC+Mybatis+Vue+MYSQL的大学生心理健康教育管理系统

项目介绍

随着社会经济的发展,医疗卫生事业取得了巨大进步,在心理健康教育占据越来越重要的地位,什么是心理健康:心理健康,从广义上讲,是指一种高效而满意的、持续的心理状态。从狭义上讲,心理健康是指人的基本心理活动的过程内容完整、协调一致,即认识、情感、意志、行为、人格完整和协调,能适应社会,与社会保持同步。

全国有20.23%的大学生存在不同程度的心理障碍甚至心理疾患,25%的大学生需要精神卫生服务,10%有明显的心理障碍症状,急需心理咨询与心理治疗。心理障碍已成为当今大学生身心健康的最大威胁。心理健康教育显得十分必要。系统采用java语言开发,后端采用ssm框架,前端采用vue技术,数据库采用mysql进行数据存储。

心理健康教育学生只要能在有网络的地方都可以运行,主要实现了线上考试测试等相关信息的查看,并且根据需求进行对管理员;首页、个人中心、学生管理、咨询师管理、文章信息管理、预约信息管理、测试题目管理、测试信息管理、测试结果管理、留言板管理、我的收藏管理、系统管理,咨询师后台;首页、个人中心、文章信息管理、预约信息管理、测试题目管理、测试信息管理、测试结果管理、留言板管理,前台首页:首页、咨询师、首页、文章信息、测试题目、留言反馈、个人中心、后台管理,学生后台:首页、个人中心、预约信息管理、测试信息管理、测试结果管理、留言板管理、我的收藏管理等主要功能模块的操作和管理。
在这里插入图片描述

开发环境

开发语言:Java
数据库 :MySQL
系统架构:B/S
后端框架:SSM
前端框架:Vue
开发工具:IDEA或者Eclipse,JDK1.8,Maven

系统截图

在这里插入图片描述在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

部分代码

package com.controller;

import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.MessageEntity;
import com.service.MessageService;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.Date;
import java.util.Map;


@RestController
@RequestMapping("/message")
public class MessageController {
    @Autowired
    private MessageService messageService;

    /**
    *  留言板
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params, MessageEntity message,
                  HttpServletRequest request){
        EntityWrapper<MessageEntity> ew = new EntityWrapper<MessageEntity>();
        if(request.getSession().getAttribute("role").toString().equals("用户")) {
            ew.eq("yonghuid",(Long)request.getSession().getAttribute("userId"));
        }
		PageUtils page = messageService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, message), params), params));
        return R.ok().put("data", page);
    }

    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params, MessageEntity message, HttpServletRequest request){
        EntityWrapper<MessageEntity> ew = new EntityWrapper<MessageEntity>();
		PageUtils page = messageService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, message), params), params));
        return R.ok().put("data", page);
    }


    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        MessageEntity message = messageService.selectById(id);
        return R.ok().put("data", message);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        MessageEntity message = messageService.selectById(id);
        return R.ok().put("data", message);
    }


    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody MessageEntity message, HttpServletRequest request){
        if(request.getSession().getAttribute("role").toString().equals("用户")) {
            message.setYonghuid((Long)request.getSession().getAttribute("userId"));
            message.setYonghuming((String) request.getSession().getAttribute("username"));
        }
        message.setAdddate(new Date());
        messageService.insert(message);
        return R.ok();
    }

    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody MessageEntity message, HttpServletRequest request){
        if(request.getSession().getAttribute("role").toString().equals("用户")) {
            message.setYonghuid((Long)request.getSession().getAttribute("userId"));
            message.setYonghuming((String) request.getSession().getAttribute("username"));
        }
        message.setAdddate(new Date());
        messageService.insert(message);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody MessageEntity message, HttpServletRequest request){
        messageService.updateById(message);
        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        messageService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值