基于Springboot+vue的智慧养老平台系统-可用于毕设-课程设计-练手学习


1.项目简介

  • 主页:echarts展示的图表
  • 系统管理:用户管理,角色管理,字典管理,菜单管理,日志管理
  • 文件管理:生成文件 文章管理:集合富文本写文章
  • 公告管理:公告的管理 轮播图管理:前台首页的轮播图
  • 新闻分类管理:新闻分类信息
  • 新闻管理:新闻的管理 养老院管理:养老院的管理
  • 评论管理:新闻,养老院的评论信息
  • 老人管理:老人信息的管理
  • 体检管理:体检信息的记录
  • 意见管理:用户的意见管理

2.项目技术选型

  • 后端:Springboot + MybatisPlus
  • 前端:Vue + ElementUI
  • 数据库: MySQL

3.项目运行部分截图

基于Springboot+vue的智慧养老院管理系统_vue.js


基于Springboot+vue的智慧养老院管理系统_毕业设计_02

基于Springboot+vue的智慧养老院管理系统_spring boot_03


基于Springboot+vue的智慧养老院管理系统_毕业设计_04


基于Springboot+vue的智慧养老院管理系统_毕业设计_05


基于Springboot+vue的智慧养老院管理系统_vue.js_06


基于Springboot+vue的智慧养老院管理系统_vue.js_07


基于Springboot+vue的智慧养老院管理系统_课程设计_08


基于Springboot+vue的智慧养老院管理系统_后端_09


基于Springboot+vue的智慧养老院管理系统_毕业设计_10

4.项目部分源码

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.authority.annotation.NoAuth;
import com.example.authority.common.Result;
import com.example.authority.entity.NursingHome;
import com.example.authority.service.NursingHomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 养老院 前端控制器
 * </p>
 * entity:  NursingHome
 */
@RestController
@RequestMapping("/nursingHome")
public class NursingHomeController {

    @Autowired
    private NursingHomeService nursingHomeService;


    /**
     * 新增/修改
     * @param nursingHome
     * @return
     */
    @PostMapping("/save")
    public Result save(@RequestBody NursingHome nursingHome){
        boolean b = nursingHomeService.saveOrUpdate(nursingHome);
        if(b){
            return Result.success();
        }else{
            return Result.error();
        }
    }

    /**
     * 根据id删除
     * @param id
     * @return
     */
    @DeleteMapping("/deleteById/{id}")
    public Result deleteById(@PathVariable Integer id){
        boolean b = nursingHomeService.removeById(id);
        if(b){
            return Result.success();
        }else{
            return Result.error();
        }
    }

    /**
     * 根据id批量删除
     * @param idList
     * @return
     */
    @PostMapping("/deleteBatch")
    public Result deleteBatch(@RequestBody List<Integer> idList){
        boolean b = nursingHomeService.removeByIds(idList);
        if(b){
            return Result.success();
        }else{
            return Result.error();
        }
    }
    /**
     * 查询全部数据
     * @return
     */
    @GetMapping("/findAll")
    @NoAuth
    public Result findAll(){
        return Result.success(nursingHomeService.list());
    }
    /**
     * 根据id查询信息
     * @return
     */
    @GetMapping("/findById/{id}")
    @NoAuth
    public Result findById(@PathVariable("id") Integer id){
        NursingHome nursingHome = nursingHomeService.getById(id);
        if(null != nursingHome){
            return Result.success(nursingHome);
        }else{
            return Result.error("500","找不到文章信息");
        }
    }

    /**
     * 分页查询
     * @param pageNum:页码
     * @param pageSize:每页条数
     * @param name:名称
     * @return
     */
    @GetMapping("/findPage")
    @NoAuth
    public Result findPage(@RequestParam Integer pageNum,
                           @RequestParam Integer pageSize,
                           @RequestParam(name = "name",defaultValue = "") String name){
            Page<NursingHome> page = new Page<>(pageNum,pageSize);
            QueryWrapper<NursingHome> queryWrapper = new QueryWrapper<>();
            if(StringUtils.isNotBlank(name)){
                queryWrapper.like("name",name);
            }
            Page<NursingHome> nursingHomePage = nursingHomeService.page(page, queryWrapper);
            return Result.success(nursingHomePage);
    }

}

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.authority.annotation.NoAuth;
import com.example.authority.common.Result;
import com.example.authority.entity.News;
import com.example.authority.service.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 资讯表 前端控制器
 * </p>
 * entity:  News
 * @author 程序员云翼
 * @since 2024-04-20
 */
@RestController
@RequestMapping("/news")
public class NewsController {

    @Autowired
    private NewsService newsService;


    /**
     * 新增/修改
     * @param news
     * @return
     */
    @PostMapping("/save")
    public Result save(@RequestBody News news){
        boolean b = newsService.saveOrUpdate(news);
        if(b){
            return Result.success();
        }else{
            return Result.error();
        }
    }

    /**
     * 根据id删除
     * @param id
     * @return
     */
    @DeleteMapping("/deleteById/{id}")
    public Result deleteById(@PathVariable Integer id){
        boolean b = newsService.removeById(id);
        if(b){
            return Result.success();
        }else{
            return Result.error();
        }
    }

    /**
     * 根据id批量删除
     * @param idList
     * @return
     */
    @PostMapping("/deleteBatch")
    public Result deleteBatch(@RequestBody List<Integer> idList){
        boolean b = newsService.removeByIds(idList);
        if(b){
            return Result.success();
        }else{
            return Result.error();
        }
    }
    /**
     * 查询全部数据
     * @return
     */
    @GetMapping("/findAll")
    public Result findAll(){
        return Result.success(newsService.list());
    }
    /**
     * 根据id查询信息
     * @return
     */
    @GetMapping("/findById/{id}")
    @NoAuth
    public Result findById(@PathVariable("id") Integer id){
        News news = newsService.getById(id);
        if(null != news){
            return Result.success(news);
        }else{
            return Result.error("500","找不到文章信息");
        }
    }
    /**
     * 根据类型获取数据
     * @return
     */
    @GetMapping("/findNewListByType")
    @NoAuth
    public Result findNewListByType(@RequestParam("sort") String sort){
        return Result.success(newsService.findNewListByType(sort));
    }

    @PutMapping("/updateCount/{id}")
    @NoAuth
    public Result updateCount(@PathVariable Integer id) {
        newsService.updateCount(id);
        return Result.success();
    }
    /**
     * 分页查询
     * @param pageNum:页码
     * @param pageSize:每页条数
     * @param title:标题
     * @return
     */
    @GetMapping("/findPage")
    @NoAuth
    public Result findPage(@RequestParam Integer pageNum,
                           @RequestParam Integer pageSize,
                           @RequestParam(name = "title",defaultValue = "") String title,
                           @RequestParam(name = "type",defaultValue = "") String type){
            Page<News> page = new Page<>(pageNum,pageSize);
            QueryWrapper<News> queryWrapper = new QueryWrapper<>();
            if(StringUtils.isNotBlank(title)){
                queryWrapper.like("title",title);
            }
            if(StringUtils.isNotBlank(type)){
                queryWrapper.like("type",type);
            }
            Page<News> newsPage = newsService.page(page, queryWrapper);
            return Result.success(newsPage);
    }

}