基于javaweb+mysql的ssm+maven会议室预约系统(java+ssm+js+jsp+mysql)

基于javaweb+mysql的ssm+maven会议室预约系统(java+ssm+js+jsp+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

基于javaweb+mysql的SSM+Maven会议室预约系统(java+ssm+js+jsp+mysql)

项目介绍

管理员角色包含以下功能: 管理员登陆,会议室管理,预约审核管理,用户注册等功能。

用户角色包含以下功能: 用户登录,会议室查询,预约记录查询,会议室预约申请,取消预约等功能。

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.数据库:MySql 5.7版本;

技术栈

  1. 后端:Spring+SpringMVC+Mybatis 2. 前端:HTML+CSS+JavaScript+jsp

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/ 登录
    @RequestMapping(value = "/queryRoom", method = {RequestMethod.POST})
    private String queryRoom(String findByName, Model model) throws Exception {

        List<Room> list = roomService.findByName(findByName);

        model.addAttribute("roomList", list);
        return "/ordinary/showRoom";
    }

    //查询接下来的15天内所有已被预约的会议室记录
    @RequestMapping("/showRecord")
    public String findAllReservation(Model model, Integer page) throws Exception {
        List<ReservationVo> list = null;

        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(reservationService.reserveCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = reservationService.findAllByPaging(1);
        } else {
            pagingVO.setToPageNo(page);
            list = reservationService.findAllByPaging(page);
        }

        model.addAttribute("recordList", list);
        model.addAttribute("pagingVo", pagingVO);

        return "/ordinary/showRecord";
    }

    //搜索借用人
    @RequestMapping(value = "/queryByUser", method = {RequestMethod.POST})
    private String queryUser(String findByName, Model model) throws Exception {

        List<ReservationVo> list = reservationService.queryByUser(findByName);

        model.addAttribute("recordList", list);

        return "/ordinary/showRecord";
    }

    //预约会议室页面跳转
    @RequestMapping(value = "/reserveRoom", method = RequestMethod.GET)
    public String reserveRoomUI(Model model) throws Exception {
        //从数据库查询出所有会议室信息回显到页面
        List<Room> list = roomService.nameList();
        model.addAttribute("nameList", list);

        return "/ordinary/reserveRoom";
    }

    //预约会议室功能实现

    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<会议室预约管理>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
    //查询所有待审核预约记录
    @RequestMapping("/showReservation")
    public String findAllReservation(Model model, Integer page) throws Exception {
        List<ReservationVo> list = null;

        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(reservationService.reservationCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = reservationService.findByPaging(1);
        } else {
            pagingVO.setToPageNo(page);
            list = reservationService.findByPaging(page);
        }

        model.addAttribute("reservationList", list);
        model.addAttribute("pagingVO", pagingVO);

        return "/admin/showReservation";
    }

    //搜索借用人
    @RequestMapping(value = "queryUser", method = {RequestMethod.POST})
    private String queryUser(String findByName, Model model) throws Exception {

        List<Reservation> list = reservationService.findByName(findByName);

        model.addAttribute("reservationList", list);
        return "/admin/showReservation";
    }

    //同意会议室申请
    @RequestMapping("/reviewReservation")
    public String reviewReservation(Integer id) throws Exception {
        reservationService.reviewReservation(id);
        return "redirect:/admin/showReservation";
    }

    //查询所有审核通过预约记录
    @RequestMapping("/showRecord")
    public String findRecord(Model model, Integer page) throws Exception {
        List<ReservationVo> list = null;

        //页码对象

/**
 */
@Controller
@RequestMapping("/ordinary")
public class OrdinaryController {

    @Resource(name = "roomServiceImpl")
    private RoomService roomService;

    @Resource(name = "reservationServiceImpl")
    private ReservationService reservationService;

    @Resource(name = "userServiceImpl")
    private UserService userService;

    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<会议室信息管理>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
    // 会议室信息显示
    @RequestMapping("/showRoom")
    public String showRoom(Model model, Integer page) throws Exception {

        List<Room> list = null;
        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(roomService.roomCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = roomService.findByPaging(1);
        } else {
            pagingVO.setToPageNo(page);
            list = roomService.findByPaging(page);
        }

        model.addAttribute("roomList", list);
        model.addAttribute("pagingVO", pagingVO);

        return "/ordinary/showRoom";
    @Resource(name = "reservationServiceImpl")
    private ReservationService reservationService;

    @Resource(name = "userServiceImpl")
    private UserService userService;

    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<会议室信息管理>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
    // 会议室信息显示
    @RequestMapping("/showRoom")
    public String showRoom(Model model, Integer page) throws Exception {

        List<Room> list = null;
        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(roomService.roomCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = roomService.findByPaging(1);
        } else {
            pagingVO.setToPageNo(page);
            list = roomService.findByPaging(page);
        }

        model.addAttribute("roomList", list);
        model.addAttribute("pagingVO", pagingVO);

        return "/admin/showRoom";
    }

    //搜索会议室
    @RequestMapping(value = "/queryRoom", method = {RequestMethod.POST})
    private String queryRoom(String findByName, Model model) throws Exception {

        List<Room> list = roomService.findByName(findByName);

        model.addAttribute("roomList", list);
        return "/admin/showRoom";
    }

    //添加会议室页面跳转
    @RequestMapping(value = "/addRoom", method = {RequestMethod.GET})
    public String addRoom(Model model) throws Exception {

        return "/admin/addRoom";
    }

    //添加会议室业务实现
    @RequestMapping(value = "/addRoom", method = {RequestMethod.POST})
    public String addRoom(Room room, Model model) throws Exception {

        roomService.add(room);
    //同意会议室申请
    @RequestMapping("/reviewReservation")
    public String reviewReservation(Integer id) throws Exception {
        reservationService.reviewReservation(id);
        return "redirect:/admin/showReservation";
    }

    //查询所有审核通过预约记录
    @RequestMapping("/showRecord")
    public String findRecord(Model model, Integer page) throws Exception {
        List<ReservationVo> list = null;

        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(reservationService.reservationPassCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = reservationService.findRecord(1);
        } else {
            pagingVO.setToPageNo(page);
            list = reservationService.findRecord(page);
        }

        model.addAttribute("recordList", list);
        model.addAttribute("pagingVo", pagingVO);

        return "/admin/showRecord";
    }

    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<用户信息管理>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
    //添加新用户
    @RequestMapping(value = "/userRegister", method = {RequestMethod.GET})
    public String userRegister(Model model) throws Exception {
        return "/admin/userRegister";
    }

    @RequestMapping(value = "/userRegister", method = RequestMethod.POST)
    public String userRegister(User user) throws Exception {
        if (user.getId() != null && user.getId() != "" && user.getPassword() != null && user.getPassword() != "") {
            userService.addNewUser(user);
        }
        return "redirect:/admin/userRegister";
    }
        model.addAttribute("roomList", list);
        model.addAttribute("pagingVO", pagingVO);

        return "/ordinary/showRoom";
    }

    //搜索会议室
    @RequestMapping(value = "/queryRoom", method = {RequestMethod.POST})
    private String queryRoom(String findByName, Model model) throws Exception {

        List<Room> list = roomService.findByName(findByName);

        model.addAttribute("roomList", list);
        return "/ordinary/showRoom";
    }

    //查询接下来的15天内所有已被预约的会议室记录
    @RequestMapping("/showRecord")
    public String findAllReservation(Model model, Integer page) throws Exception {
        List<ReservationVo> list = null;

        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(reservationService.reserveCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = reservationService.findAllByPaging(1);
        } else {
            pagingVO.setToPageNo(page);
            list = reservationService.findAllByPaging(page);
        }

        model.addAttribute("recordList", list);
        model.addAttribute("pagingVo", pagingVO);

        return "/ordinary/showRecord";
    }

    //搜索借用人
    @RequestMapping(value = "/queryByUser", method = {RequestMethod.POST})
    private String queryUser(String findByName, Model model) throws Exception {

        List<ReservationVo> list = reservationService.queryByUser(findByName);

        roomService.updateById(room);

        //重定向
        return "redirect:/admin/showRoom";
    }

    // 删除会议室信息
    @RequestMapping("/removeRoom")
    public String removeRoom(Integer id) throws Exception {
        if (id == null) {
            //加入没有带教师id就进来的话就返回教师显示页面
            return "/admin/showRoom";
        }
        roomService.removeById(id);

        return "redirect:/admin/showRoom";
    }

    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<会议室预约管理>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
    //查询所有待审核预约记录
    @RequestMapping("/showReservation")
    public String findAllReservation(Model model, Integer page) throws Exception {
        List<ReservationVo> list = null;

        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(reservationService.reservationCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = reservationService.findByPaging(1);
        } else {
            pagingVO.setToPageNo(page);
            list = reservationService.findByPaging(page);
        }

        model.addAttribute("reservationList", list);
        model.addAttribute("pagingVO", pagingVO);

        return "/admin/showReservation";
    }

    //搜索借用人
    @RequestMapping(value = "queryUser", method = {RequestMethod.POST})
    private String queryUser(String findByName, Model model) throws Exception {

        List<Reservation> list = reservationService.findByName(findByName);

        model.addAttribute("reservationList", list);
        //重定向
        return "redirect:/admin/showRoom";
    }

    // 删除会议室信息
    @RequestMapping("/removeRoom")
    public String removeRoom(Integer id) throws Exception {
        if (id == null) {
            //加入没有带教师id就进来的话就返回教师显示页面
            return "/admin/showRoom";
        }
        roomService.removeById(id);

        return "redirect:/admin/showRoom";
    }

    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<会议室预约管理>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
    //查询所有待审核预约记录
    @RequestMapping("/showReservation")
    public String findAllReservation(Model model, Integer page) throws Exception {
        List<ReservationVo> list = null;

        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(reservationService.reservationCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = reservationService.findByPaging(1);
        } else {
            pagingVO.setToPageNo(page);
            list = reservationService.findByPaging(page);
        }

        model.addAttribute("reservationList", list);
        model.addAttribute("pagingVO", pagingVO);

        return "/admin/showReservation";
    }

    //搜索借用人
    @RequestMapping(value = "queryUser", method = {RequestMethod.POST})
    private String queryUser(String findByName, Model model) throws Exception {

        List<Reservation> list = reservationService.findByName(findByName);

        model.addAttribute("roomList", list);
        return "/ordinary/showRoom";
    }

    //查询接下来的15天内所有已被预约的会议室记录
    @RequestMapping("/showRecord")
    public String findAllReservation(Model model, Integer page) throws Exception {
        List<ReservationVo> list = null;

        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(reservationService.reserveCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = reservationService.findAllByPaging(1);
        } else {
            pagingVO.setToPageNo(page);
            list = reservationService.findAllByPaging(page);
        }

        model.addAttribute("recordList", list);
        model.addAttribute("pagingVo", pagingVO);

        return "/ordinary/showRecord";
    }

    //搜索借用人
    @RequestMapping(value = "/queryByUser", method = {RequestMethod.POST})
    private String queryUser(String findByName, Model model) throws Exception {

        List<ReservationVo> list = reservationService.queryByUser(findByName);

        model.addAttribute("recordList", list);

        return "/ordinary/showRecord";
    }

    //预约会议室页面跳转
    @RequestMapping(value = "/reserveRoom", method = RequestMethod.GET)
    public String reserveRoomUI(Model model) throws Exception {
        //从数据库查询出所有会议室信息回显到页面
        List<Room> list = roomService.nameList();
        model.addAttribute("nameList", list);

        return "/ordinary/reserveRoom";
    }

    //预约会议室功能实现
    @RequestMapping(value = "/reserveRoom", method = RequestMethod.POST)
    public String reserveRoom(ReservationCustom reservationCustom) throws Exception {

    }

    // 删除会议室信息
    @RequestMapping("/removeRoom")
    public String removeRoom(Integer id) throws Exception {
        if (id == null) {
            //加入没有带教师id就进来的话就返回教师显示页面
            return "/admin/showRoom";
        }
        roomService.removeById(id);

        return "redirect:/admin/showRoom";
    }

    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<会议室预约管理>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
    //查询所有待审核预约记录
    @RequestMapping("/showReservation")
    public String findAllReservation(Model model, Integer page) throws Exception {
        List<ReservationVo> list = null;

        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(reservationService.reservationCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = reservationService.findByPaging(1);
        } else {
            pagingVO.setToPageNo(page);
            list = reservationService.findByPaging(page);
        }

        model.addAttribute("reservationList", list);
        model.addAttribute("pagingVO", pagingVO);

        return "/admin/showReservation";
    }

    //搜索借用人
    @RequestMapping(value = "queryUser", method = {RequestMethod.POST})
    private String queryUser(String findByName, Model model) throws Exception {

        List<Reservation> list = reservationService.findByName(findByName);

        model.addAttribute("reservationList", list);
        return "/admin/showReservation";
    }

    //同意会议室申请
    @RequestMapping("/reviewReservation")
    public String reviewReservation(Integer id) throws Exception {
    public String cancelApplicationUI(String user,Model model) throws Exception{
        List<ReservationCustom> list=reservationService.findByUser(user);
        model.addAttribute("reserveList",list);

        return "/ordinary/cancelApplication";
    }

    //取消预约申请业务实现
    @RequestMapping("/cancelApply")
    public String cancelApplication(Integer id) throws Exception{
        reservationService.cancelApplication(id);

        return "redirect:/ordinary/showRecord";
    }

}

/**
 */
@Controller
public class LoginController {

    //登录跳转
    @RequestMapping(value = "/login", method = {RequestMethod.GET})
    public String loginUI() throws Exception {
        return "../../login";
    }

    //登录表单处理
    @RequestMapping(value = "/login", method = {RequestMethod.POST})
    public String login(User user) throws Exception {

        //Shiro实现登录
        UsernamePasswordToken token = new UsernamePasswordToken(user.getId(),user.getPassword());
        Subject subject = SecurityUtils.getSubject();

        //如果获取不到用户名就是登录失败,但登录失败的话,会直接抛出异常
        subject.login(token);

        if (subject.hasRole("admin")) {
            return "redirect:/admin/showRoom";
        } else if (subject.hasRole("ordinary")) {
            return "redirect:/ordinary/showRoom";
        return "/admin/showReservation";
    }

    //搜索借用人
    @RequestMapping(value = "queryUser", method = {RequestMethod.POST})
    private String queryUser(String findByName, Model model) throws Exception {

        List<Reservation> list = reservationService.findByName(findByName);

        model.addAttribute("reservationList", list);
        return "/admin/showReservation";
    }

    //同意会议室申请
    @RequestMapping("/reviewReservation")
    public String reviewReservation(Integer id) throws Exception {
        reservationService.reviewReservation(id);
        return "redirect:/admin/showReservation";
    }

    //查询所有审核通过预约记录
    @RequestMapping("/showRecord")
    public String findRecord(Model model, Integer page) throws Exception {
        List<ReservationVo> list = null;

        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(reservationService.reservationPassCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = reservationService.findRecord(1);
        } else {
            pagingVO.setToPageNo(page);
            list = reservationService.findRecord(page);
        }

        model.addAttribute("recordList", list);
        model.addAttribute("pagingVo", pagingVO);

        return "/admin/showRecord";
    }

    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<用户信息管理>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
    //添加新用户
    @RequestMapping("/showRoom")
    public String showRoom(Model model, Integer page) throws Exception {

        List<Room> list = null;
        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(roomService.roomCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = roomService.findByPaging(1);
        } else {
            pagingVO.setToPageNo(page);
            list = roomService.findByPaging(page);
        }

        model.addAttribute("roomList", list);
        model.addAttribute("pagingVO", pagingVO);

        return "/admin/showRoom";
    }

    //搜索会议室
    @RequestMapping(value = "/queryRoom", method = {RequestMethod.POST})
    private String queryRoom(String findByName, Model model) throws Exception {

        List<Room> list = roomService.findByName(findByName);

        model.addAttribute("roomList", list);
        return "/admin/showRoom";
    }

    //添加会议室页面跳转
    @RequestMapping(value = "/addRoom", method = {RequestMethod.GET})
    public String addRoom(Model model) throws Exception {

        return "/admin/addRoom";
    }

    //添加会议室业务实现
    @RequestMapping(value = "/addRoom", method = {RequestMethod.POST})
    public String addRoom(Room room, Model model) throws Exception {

        roomService.add(room);

        return "redirect:/admin/showRoom";
    }

    // 修改会议室信息页面显示

        model.addAttribute("recordList", list);
        model.addAttribute("pagingVo", pagingVO);

        return "/admin/showRecord";
    }

    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<用户信息管理>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
    //添加新用户
    @RequestMapping(value = "/userRegister", method = {RequestMethod.GET})
    public String userRegister(Model model) throws Exception {
        return "/admin/userRegister";
    }

    @RequestMapping(value = "/userRegister", method = RequestMethod.POST)
    public String userRegister(User user) throws Exception {
        if (user.getId() != null && user.getId() != "" && user.getPassword() != null && user.getPassword() != "") {
            userService.addNewUser(user);
        }
        return "redirect:/admin/userRegister";
    }
}

/**
 */
    @Resource(name = "roomServiceImpl")
    private RoomService roomService;

    @Resource(name = "reservationServiceImpl")
    private ReservationService reservationService;

    @Resource(name = "userServiceImpl")
    private UserService userService;

    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<会议室信息管理>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
    // 会议室信息显示
    @RequestMapping("/showRoom")
    public String showRoom(Model model, Integer page) throws Exception {

        List<Room> list = null;
        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(roomService.roomCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = roomService.findByPaging(1);
        } else {
            pagingVO.setToPageNo(page);
            list = roomService.findByPaging(page);
        }

        model.addAttribute("roomList", list);
        model.addAttribute("pagingVO", pagingVO);

        return "/ordinary/showRoom";
    }

    //搜索会议室
    @RequestMapping(value = "/queryRoom", method = {RequestMethod.POST})
    private String queryRoom(String findByName, Model model) throws Exception {

        List<Room> list = roomService.findByName(findByName);

        model.addAttribute("roomList", list);
        return "/ordinary/showRoom";
    }

    //查询接下来的15天内所有已被预约的会议室记录
        model.addAttribute("roomList", list);
        return "/ordinary/showRoom";
    }

    //查询接下来的15天内所有已被预约的会议室记录
    @RequestMapping("/showRecord")
    public String findAllReservation(Model model, Integer page) throws Exception {
        List<ReservationVo> list = null;

        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(reservationService.reserveCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = reservationService.findAllByPaging(1);
        } else {
            pagingVO.setToPageNo(page);
            list = reservationService.findAllByPaging(page);
        }

        model.addAttribute("recordList", list);
        model.addAttribute("pagingVo", pagingVO);

        return "/ordinary/showRecord";
    }

    //搜索借用人
    @RequestMapping(value = "/queryByUser", method = {RequestMethod.POST})
    private String queryUser(String findByName, Model model) throws Exception {

        List<ReservationVo> list = reservationService.queryByUser(findByName);

        model.addAttribute("recordList", list);

        return "/ordinary/showRecord";
    }

    //预约会议室页面跳转
    @RequestMapping(value = "/reserveRoom", method = RequestMethod.GET)
    public String reserveRoomUI(Model model) throws Exception {
        //从数据库查询出所有会议室信息回显到页面
        List<Room> list = roomService.nameList();
        model.addAttribute("nameList", list);

        return "/ordinary/reserveRoom";
    }


    @Resource(name = "userServiceImpl")
    private UserService userService;

    /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<会议室信息管理>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
    // 会议室信息显示
    @RequestMapping("/showRoom")
    public String showRoom(Model model, Integer page) throws Exception {

        List<Room> list = null;
        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.setTotalCount(roomService.roomCount());
        if (page == null || page == 0) {
            pagingVO.setToPageNo(1);
            list = roomService.findByPaging(1);
        } else {
            pagingVO.setToPageNo(page);
            list = roomService.findByPaging(page);
        }

        model.addAttribute("roomList", list);
        model.addAttribute("pagingVO", pagingVO);

        return "/admin/showRoom";
    }

    //搜索会议室
    @RequestMapping(value = "/queryRoom", method = {RequestMethod.POST})
    private String queryRoom(String findByName, Model model) throws Exception {

        List<Room> list = roomService.findByName(findByName);

        model.addAttribute("roomList", list);
        return "/admin/showRoom";
    }

    //添加会议室页面跳转
    @RequestMapping(value = "/addRoom", method = {RequestMethod.GET})
    public String addRoom(Model model) throws Exception {

        return "/admin/addRoom";
    }

    //添加会议室业务实现
    @RequestMapping(value = "/addRoom", method = {RequestMethod.POST})
    public String addRoom(Room room, Model model) throws Exception {

        roomService.add(room);

        return "redirect:/admin/showRoom";
    }

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
项目描述 基于SpringBoot+thymeleaf实现的大学生自习室座位预定系统是为座位管理打造的一款在线管理平台,它可以实时完成信息处理,使其系统化和规范化。 系统功能说明 管理员 1、用户管理 管理员可以新增、删除管理员 管理员可以删除学生 2、自习室管理 管理员可以新增自习室、设置自习室的座位数量、开放时间,对自习室进行管理 管理员可以管理学生的预订情况、可以强制退订 3、学院班级管理 管理员可以新增、修改、删除学院、班级(实际上这部分数据应该来源于教务系统) 4、个人管理 管理员可以对自己信息进行修改 学生 1、自习室管理 学生可以查看自习室座位的预定情况并进行预定 学生可以查看自己的预定情况,并退订 2、个人信息管理 学生可以修改自己的用户信息 需改进之处 1、学生在预定座位后,无法判断是否按时去座位学习,可加入学生签到打卡功能。 2、学生在预定座位后,如未去学习,该作为在该时间段无法被其他同学预约,浪费公共资源,可加入学生信用的功能,指定信用分之下禁止预定座位 3、到学期末座位紧张,可考虑加入学生求座功能,管理员精确控制自习室的情况,以保证作为供应充足(实际上还需要教室资源充足) 4、可加入学生留言功能,方便接收更好的建议 5、...... 运行环境 jdk8+tomcat8+mysql5.7+IntelliJ IDEA+maven 项目技术(必填) 服务端:SpringBoot + mybatis-plus + thymeleaf 前端:layui + jquery 数据库文件(可选) 项目中包含了 资源包文件(可选) MySQL5下载链接:https://pan.baidu.com/s/1cuu0F2RM_DulSz2Tk1fXIA 提取码:jcxs Maven3.6.0下载链接:https://pan.baidu.com/s/1vmEo2EB2kvNB1v4IowILRQ 提取码:67mg 运行视频(可选) 链接: https://pan.baidu.com/s/1H2Fmvk5Z-kANnAkqSooYHQ?pwd=xwex 提取码: xwex

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值