基于javaweb+mysql的ssm宠物医院管理系统(java+ssm+jquery+layui+js+mysql)
私信源码获取及调试交流
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb的SSM宠物医院管理系统(java+ssm+jquery+layui+js+mysql)
项目介绍
基于SSM的宠物医院管理系统
角色:管理员、用户、医生
管理员: 管理员登录后,通过管理员菜单来管理后台系统。主要功能有:个人中心、用户管理、医生管理、医学知识管理、科室信息管理、医生信息管理、预约挂号管理、医嘱信息管理、药品信息管理、订单信息管理、留言板管理、系统管理等功能
用户:用户进入系统可以个人中心、预约挂号管理、医嘱信息管理、订单信息管理等
医生: 个人中心、预约挂号管理、医嘱信息管理
用户:用户进入系统可以个人中心、预约挂号管理、医嘱信息管理、订单信息管理等
环境需要
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.是否Maven项目: 否;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目; 6.数据库:MySql 5.7/8.0等版本均可;
技术栈
后端:SSM(Spring+SpringMVC+Mybatis) 前端:JSP+CSS+JS+JQUERY+Layui
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,修改配置,运行项目; 3. 将项目中db.xml配置文件中的数据库配置改为自己的配置,然后运行;
* Description: 增加角色 <BR> * @param name * @return String<BR> */ @RequestMapping("/addRole") @ResponseBody public String addRole(String name) { return roleService.addRole(name); /** * Method name: delManageRole <BR> * Description: 根据角色id删除角色 <BR> * @param id
复制
* @return String<BR> */ @RequestMapping("/page") public String page(Model model) { List<Page> pageList = pageService.getAllPage(); model.addAttribute("pageList", pageList); return "sa/page"; /** * Method name: role <BR> * Description: 跳转到角色设置页面 <BR>
复制
public String role(Model model) { return "sa/role"; /** * Method name: getAllRole <BR> * Description: 获取所有权限 <BR> * @return List<Role><BR> */ @RequestMapping("/getAllRole") @ResponseBody public List<Role> getAllRole() { return roleService.getAllRole(); /** * Method name: getAllPage <BR>
复制
* Description: 根据用户id权限id删除用户权限表 <BR> * @param userId * @param roleId * @return ResultMap<BR> */ @RequestMapping("/delUserRoleByUserIdAndRoleId") @ResponseBody public ResultMap delUserRoleByUserIdAndRoleId(String userId, Integer roleId) { return userRoleService.delUserRoleByUserIdAndRoleId(userId, roleId); /** * Method name: selectUserRole <BR> * Description: 跳转到选择用户角色页面 <BR>
复制
* Description: 跳转到角色设置页面 <BR> * @param model * @return String<BR> */ @RequestMapping("/role") public String role(Model model) { return "sa/role"; /** * Method name: getAllRole <BR> * Description: 获取所有权限 <BR> * @return List<Role><BR>
复制
* Method name: logout <BR> * Description: 退出登录 <BR> * @return String<BR> */ @RequestMapping(value = "/logout", method = RequestMethod.GET) public String logout() { Subject subject = SecurityUtils.getSubject(); User user = (User) subject.getPrincipal(); if (null != user) { logger.info("{}---退出登录!", user.getName()); subject.logout(); return "login"; /**
复制
* Description: 根据角色查询下面所有的人员/非角色下所有人员 <BR> */ @RequestMapping("/getAllUserByRoleId") @ResponseBody public Object getAllUserByRoleId(Integer roleId, String roleNot, Integer page, Integer limit) { if (null == roleNot) { return userService.getAllUserByRoleId(roleId, page, limit); return userService.getAllUserByNotRoleId(roleId, page, limit); /** * Method name: delUserRoleByUserIdAndRoleId <BR> * Description: 根据用户id权限id删除用户权限表 <BR> * @param userId
复制
* @param page * @return ResultMap<BR> */ @RequestMapping("/updatePageById") @ResponseBody public ResultMap updatePageById(Page page) { return pageService.updatePageById(page); /** * Method name: addPage <BR> * Description: 添加页面 <BR> * @param page * @return Page<BR>
复制
boolean flag3 = userRoleService.delUserRoleByRoleId(id); if (flag1 && flag2 && flag3) { return "SUCCESS"; return "ERROR"; /** * Method name: updateRole <BR> * Description: 根据权限id修改权限信息 <BR> * @param id * @param name * @return String<BR> */ @RequestMapping("/updateRole") @ResponseBody
复制
*/ @RequestMapping(value = "/user/updatePassword") @ResponseBody public String updatePassword(String password) { return userService.updatePassword(password); 用户信息控制层: /** * 用户控制 */ @Controller("User")
复制
@ResponseBody @Transactional public String delUser(Long[] ids) { Subject subject = SecurityUtils.getSubject(); User user = (User) subject.getPrincipal(); try { for (Long id : ids) { if (id.equals(user.getId())) { return "DontOP"; userService.delUserById(id); return "SUCCESS"; } catch (Exception e) {
复制
@RequestMapping("/updateRole") @ResponseBody public String updateRole(Integer id, String name) { int n = roleService.updateRoleById(id, name); if (n != 0) { return "SUCCESS"; return "ERROR"; /** * Method name: addPageRoleByRoleId <BR> * Description: 增加某个角色的权限页面 <BR> * @param roleId
复制
/** * Method name: getAllUserByLimit <BR> * Description: 根据条件获取所有用户 <BR> * @param userParameter * @return Object<BR> */ @RequestMapping("/getAllUserByLimit") @ResponseBody public Object getAllUserByLimit(UserParameter userParameter) { return userService.getAllUserByLimit(userParameter); /** * Method name: getAllDelUserByLimit <BR> * Description: 获取所有删除用户 <BR>
复制
private UserService userService; private final Logger logger = LoggerFactory.getLogger(Adminontroller.class); /** * Method name: page <BR> * Description: 跳转到页面设置页面 <BR> * @param model * @return String<BR> */ @RequestMapping("/page") public String page(Model model) { List<Page> pageList = pageService.getAllPage();
复制
/** * Method name: addPage <BR> * Description: 添加页面 <BR> * @param page * @return Page<BR> */ @RequestMapping("/addPage") @ResponseBody public Page addPage(Page page) { return pageService.addPage(page); /** * Method name: delPageById <BR> * Description: 根据页面id删除页面 <BR> * @param id
复制
return "sa/userAdd"; /** * Method name: checkUserId <BR> * Description: 检测用户账号是否存在 <BR> * @param userId * @return User<BR> */ @ResponseBody @RequestMapping("/checkUserId") public User checkUserId(Long userId) {
复制
* Method name: userPage <BR> * Description: 用户管理页面 <BR> * @return String<BR> */ @RequestMapping(value = "/userPage") public String userPage() { return "sa/userList"; /** * Method name: getAllUserByLimit <BR> * Description: 根据条件获取所有用户 <BR> * @param userParameter
复制
return resultMap.fail().message("注册失败"); /** * Method name: index <BR> * Description: 登录页面 <BR> * @return String login.html<BR> */ @RequestMapping(value = "/") public String index(Model model) { Subject subject = SecurityUtils.getSubject(); User user = (User) subject.getPrincipal(); if (null != user) { model.addAttribute("user", user);
复制