当前位置:   article > 正文

(免费分享)基于springboot,vue宿舍管理系统_node.js+vue毕设学生宿舍管理系统源码

node.js+vue毕设学生宿舍管理系统源码

本系统功能包括:权限管理,菜单管理,项目运行宿舍管理,学生管理,班级管理,宿舍楼管理,各项记录(归寝记录,维修记录,请假记录,晚归记录),各项系统管理(用户管理,角色管理,菜单管理)等功能。

环境配置:

Jdk1.8 + Redis + Mysql 8.0

项目技术:

Springboot + Maven + Mybatis + Vue 等等组成

  1. package com.example.springboot.service.impl;
  2. import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  3. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  4. import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  5. import com.example.springboot.entity.Student;
  6. import com.example.springboot.mapper.StudentMapper;
  7. import com.example.springboot.service.StudentService;
  8. import org.springframework.stereotype.Service;
  9. import javax.annotation.Resource;
  10. @Service
  11. public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements StudentService {
  12. /**
  13. * 注入DAO层对象
  14. */
  15. @Resource
  16. private StudentMapper studentMapper;
  17. /**
  18. * 学生登陆
  19. */
  20. @Override
  21. public Student stuLogin(String username, String password) {
  22. QueryWrapper<Student> qw = new QueryWrapper<>();
  23. qw.eq("username", username);
  24. qw.eq("password", password);
  25. Student student = studentMapper.selectOne(qw);
  26. if (student != null) {
  27. return student;
  28. } else {
  29. return null;
  30. }
  31. }
  32. /**
  33. * 学生新增
  34. */
  35. @Override
  36. public int addNewStudent(Student student) {
  37. int insert = studentMapper.insert(student);
  38. return insert;
  39. }
  40. /**
  41. * 分页查询学生
  42. */
  43. @Override
  44. public Page find(Integer pageNum, Integer pageSize, String search) {
  45. Page page = new Page<>(pageNum, pageSize);
  46. QueryWrapper<Student> qw = new QueryWrapper<>();
  47. qw.like("name", search);
  48. Page studentPage = studentMapper.selectPage(page, qw);
  49. return studentPage;
  50. }
  51. /**
  52. * 更新学生信息
  53. */
  54. @Override
  55. public int updateNewStudent(Student student) {
  56. int i = studentMapper.updateById(student);
  57. return i;
  58. }
  59. /**
  60. * 删除学生信息
  61. */
  62. @Override
  63. public int deleteStudent(String username) {
  64. int i = studentMapper.deleteById(username);
  65. return i;
  66. }
  67. /**
  68. * 主页顶部:学生统计
  69. */
  70. @Override
  71. public int stuNum() {
  72. QueryWrapper<Student> qw = new QueryWrapper<>();
  73. qw.isNotNull("username");
  74. int stuNum = Math.toIntExact(studentMapper.selectCount(qw));
  75. return stuNum;
  76. }
  77. /**
  78. * 床位信息,查询该学生信息
  79. */
  80. @Override
  81. public Student stuInfo(String username) {
  82. QueryWrapper<Student> qw = new QueryWrapper<>();
  83. qw.eq("username", username);
  84. Student student = studentMapper.selectOne(qw);
  85. return student;
  86. }
  87. }
  88. 免费领取下载链接-关注底部gongzhonghao:033
本文内容由网友自发贡献,转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/166801
推荐阅读
相关标签
  

闽ICP备14008679号