Dormitory management system based on Spring Boot

Source code and sql file download address : https://download.csdn.net/download/sheziqiong/87776127
Source code and sql file download address : https://download.csdn.net/download/sheziqiong/87776127

SpringBootDMS

Dormitory Management System based on Spring Boot. Using MySQL as the database, it is designed and developed based on the B/S architecture under the framework of Spring Boot + SpringMVC + MyBatis + Layui.

Folder introduction:

  • databaseStored in the SQL file
  • dormitoryThe backend code is stored in
  • dormitoryfrontThe front-end code is stored in
  • excelStored in is the Excel file that may be used in the file upload part when the system is running

1. Project introduction

The dormitory management system based on Spring Boot is my undergraduate graduation project, and now I will share it to communicate and learn with you. Welcome friends to leave comments~

The system uses MySQL 8.0.23 as the database, and is designed and developed based on the B/S architecture under the framework of Spring Boot + SpringMVC + MyBatis + Layui . Users in the system are divided into three categories, namely students, dormitory management, and logistics. These three types of users have different operation permissions.

The technologies used in the system include Axios , Echarts , POI , JWT , etc. Featured functions include humanized dormitory allocation, visualized bill management, room management, bookkeeping management, data import into database after uploading Excel files, etc.

1. Functional modules

The functional block diagram of the system is shown in the figure below.

2. ER Diagram

The ER diagram of the system is shown in the figure below.

3. Page effect

Some functional module pages of the system are shown below.



public class UserService {
    
    

    @Autowired
    private UserMapper userMapper;

    public int create(User user) {
    
    
        return userMapper.create(user);
    }

    public int delete(String ids) {
    
    
        String[] arr = ids.split(",");              // 将前端删除时传递的多个id组成的字符串分开
        int row = 0;
        for (String s : arr) {
    
    
            if(!StringUtils.isEmpty(s)){
    
    
                userMapper.delete(Integer.parseInt(s));
            row++;
            }
        }
        return row;
    }

    public int delete(Integer id) {
    
    
        return userMapper.delete(id);
    }

    public int update(User user) {
    
    
        return userMapper.update(user);
    }

    public int updateSelective(User user) {
    
    
        return userMapper.updateSelective(user);
    }

    public PageInfo<User> query(User user) {
    
    
        if(user != null && user.getPage() != null){
    
    
            PageHelper.startPage(user.getPage(),user.getLimit());
        }
        return new PageInfo<User>(userMapper.query(user));
    }

    public User detail(Integer id) {
    
    
        return userMapper.detail(id);
    }

    public int count(User user) {
    
    
        return userMapper.count(user);
    }

    public User login(String userName, String userPwd, Integer userType){
    
    
        return userMapper.login(userName, userPwd, userType);
    }

    // 查询某个房间住了多少人
    public int queryLiverAmount(Integer roomId){
    
    
        return userMapper.queryLiverAmount(roomId);
    }

    // 查询某栋楼住了多少人
    public int buildingActualStudentAmount(Integer buildingId){
    
    
        return userMapper.buildingActualStudentAmount(buildingId);
    }


}

Source code and sql file download address : https://download.csdn.net/download/sheziqiong/87776127
Source code and sql file download address : https://download.csdn.net/download/sheziqiong/87776127

おすすめ

転載: blog.csdn.net/newlw/article/details/130635409