首页 > 分享 > 基于springboot的宠物医院管理系统4拥有多种角色,管理员可以自行对不同用户设置不同的角色权限,具体功能如下 : 用户管理、角色管理、权限管理、宠物管理、宠物病例管理、健康指南管理、健康图表分

基于springboot的宠物医院管理系统4拥有多种角色,管理员可以自行对不同用户设置不同的角色权限,具体功能如下 : 用户管理、角色管理、权限管理、宠物管理、宠物病例管理、健康指南管理、健康图表分

文末查看项目功能视频演示+获取源码+sql脚本+视频导入教程视频

1 、功能描述

  基于springboot的宠物医院管理系统4拥有多种角色,管理员可以自行对不同用户设置不同的角色权限,具体功能如下 :

用户管理、角色管理、权限管理、宠物管理、宠物病例管理、健康指南管理、健康图表分析、宠物日志、预约统计、登录注册等

1.1 背景描述

  宠物管理系统是一种旨在帮助宠物服务业管理日常运营的软件系统。该系统通常包括宠物预订管理、医疗记录跟踪、用户信息管理、支付结算和库存管理等功能。通过宠物管理系统,服务人员能够轻松记录宠物的预订信息,包括预约时间和服务类型,并实时更新可用服务情况。此外,系统还能够追踪宠物的医疗记录和健康状况,为每只宠物建立个人档案,以便更好地提供定制化的服务。对于财务管理方面,系统能够有效地管理账单和支付流程,减少错误和延误。库存管理功能有助于管理宠物用品和食品库存,确保充足并及时补充。最后,宠物管理系统还能协助管理员工排班和记录考勤,以确保服务高效有序。这些功能共同帮助宠物服务行业提高运营效率、优化客户体验,并实现良好的经营管理。

2、项目技术

后端框架:springboot、Mybatis

前端技术:html、css、JavaScript、JQuery

2.1 springboot

  Spring Boot是由Pivotal团队提供的基于Spring的框架,该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置。Spring Boot集成了绝大部分目前流行的开发框架,就像Maven集成了所有的JAR包一样,Spring Boot集成了几乎所有的框架,使得开发者能快速搭建Spring项目。

2.2 mysql

  MySQL是一款Relational Database Management System,直译过来的意思就是关系型数据库管理系统,MySQL有着它独特的特点,这些特点使他成为目前最流行的RDBMS之一,MySQL想比与其他数据库如ORACLE、DB2等,它属于一款体积小、速度快的数据库,重点是它符合本次毕业设计的真实租赁环境,拥有成本低,开发源码这些特点,这也是选择它的主要原因。

3、开发环境

JAVA版本:JDK1.8(最佳)IDE类型:IDEA、Eclipse都可运行tomcat版本:不需要数据库类型:MySql(5.7、8.x版本都可)maven版本:无限制硬件环境:Windows

4、功能截图+视频演示+文档目录

4.1 登录

登录

4.2 功能模块

预约统计

宠物病例

宠物管理

宠物日志

宠物图表

健康指南管理

角色管理

我的宠物健康分析图表

用户管理

4.4 文档目录

报告目录

5 、核心代码实现

5.1 配置代码

server.port=8086 debug=true logging.level.com.phms.mapper=debug spring.datasource.druid.initial-size=10 spring.datasource.druid.min-idle=10 spring.datasource.druid.max-active=200 spring.datasource.druid.max-wait=60000 spring.datasource.druid.time-between-eviction-runs-millis=60000 spring.datasource.druid.min-evictable-idle-time-millis=300000 spring.datasource.druid.validation-query=SELECT 1 FROM DUAL spring.datasource.druid.test-while-idle=true spring.datasource.druid.test-on-borrow=false spring.datasource.druid.test-on-return=false spring.datasource.druid.pool-prepared-statements=true spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20 spring.datasource.druid.filters=stat,wall,log4j #spring.profiles.active=prod spring.jackson.date-format=yyyy/MM/dd HH:mm:ss logging.level.org.springframework.boot.autoconfigure=ERROR #spring.jackson.time-zone=GMT+8 spring.mvc.static-path-pattern=/** spring.resources.static-locations=classpath:/static/ spring.thymeleaf.cache=false spring.thymeleaf.prefix=classpath:/html/ spring.thymeleaf.suffix=.html spring.thymeleaf.mode=HTML spring.thymeleaf.encoding=UTF-8 spring.thymeleaf.servlet.content-type=text/html pagehelper.helperDialect=mysql pagehelper.reasonable=true pagehelper.supportMethodsArguments=true pagehelper.params = count=countSql pagehelper.pageSize=10 spring.servlet.multipart.maxFileSize=10MB spring.servlet.multipart.maxRequestSize=10MB log4j.logger.com.ibatis=DEBUG log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG log4j.logger.Java.sql.Connection=DEBUG log4j.logger.java.sql.Statement=DEBUG log4j.logger.java.sql.PreparedStatement=DEBUG

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 5.2 其它核心代码

package com.phms.controller.admin; import com.phms.model.ResultMap; import com.phms.pojo.Page; import com.phms.pojo.Role; import com.phms.pojo.User; import com.phms.pojo.UserParameter; import com.phms.service.*; import com.phms.utils.MD5; import org.apache.shiro.SecurityUtils; import org.apache.shiro.subject.Subject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.interceptor.TransactionAspectSupport; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.Date; import java.util.List; /** * 管理员权限控制类 */ @Controller("Admin") @RequestMapping("/admin") public class Adminontroller {@Autowiredprivate PageService pageService;@Autowiredprivate RoleService roleService;@Autowiredprivate PageRoleService pageRoleService;@Autowiredprivate UserRoleService userRoleService;@Autowiredprivate 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();model.addAttribute("pageList", pageList);return "sa/page";}/** * Method name: role <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> */@RequestMapping("/getAllRole")@ResponseBodypublic List<Role> getAllRole() {return roleService.getAllRole();}/** * Method name: getAllPage <BR> * Description: 获取所有页面 <BR> * * @return List<Page><BR> */@RequestMapping("/getAllPage")@ResponseBodypublic List<Page> getAllPage() {return pageService.getAllPage();}/** * Method name: getPageByRole <BR> * Description: 获取某个角色的权限页面 <BR> */@RequestMapping("/getPageByRole")@ResponseBodypublic Object getPageByRole(Integer roleId) {return pageService.getAllPageByRoleId(roleId);}/** * Method name: updatePageById <BR> * Description: 根据页面id更新页面 <BR> * * @param page * @return ResultMap<BR> */@RequestMapping("/updatePageById")@ResponseBodypublic ResultMap updatePageById(Page page) {return pageService.updatePageById(page);}/** * Method name: addPage <BR> * Description: 添加页面 <BR> * * @param page * @return Page<BR> */@RequestMapping("/addPage")@ResponseBodypublic Page addPage(Page page) {return pageService.addPage(page);}/** * Method name: delPageById <BR> * Description: 根据页面id删除页面 <BR> * * @param id * @return ResultMap<BR> */@RequestMapping("/delPageById")@ResponseBodypublic ResultMap delPageById(Integer id) {if (null == id) {return new ResultMap().fail().message("参数错误");}return pageService.delPageById(id);}/** * Method name: addRole <BR> * Description: 增加角色 <BR> * * @param name * @return String<BR> */@RequestMapping("/addRole")@ResponseBodypublic String addRole(String name) {return roleService.addRole(name);}/** * Method name: delManageRole <BR> * Description: 根据角色id删除角色 <BR> * * @param id * @return String<BR> */@RequestMapping("/delRole")@ResponseBodypublic String delRole(int id) {// 删除角色boolean flag1 = roleService.delRoleById(id);// 删除角色_权限表boolean flag2 = pageRoleService.delPageRoleByRoleId(id);// 删除某个角色的所有用户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")@ResponseBodypublic 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 * @param pageIds * @return String<BR> */@RequestMapping("/addPageRoleByRoleId")@ResponseBodypublic String addPageRoleByRoleId(Integer roleId, Integer[] pageIds) {if (null == roleId) {return "ERROR";}// 先删除老的权限boolean flag1 = pageRoleService.delPageRoleByRoleId(roleId);boolean flag2 = pageRoleService.addPageRoles(roleId, pageIds);if (flag1 && flag2) {return "SUCCESS";}return "ERROR";}/** * Method name: getAllUserByMap <BR> * Description: 根据角色查询下面所有的人员/非角色下所有人员 <BR> */@RequestMapping("/getAllUserByRoleId")@ResponseBodypublic 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 roleId * @return ResultMap<BR> */@RequestMapping("/delUserRoleByUserIdAndRoleId")@ResponseBodypublic ResultMap delUserRoleByUserIdAndRoleId(String userId, Integer roleId) {return userRoleService.delUserRoleByUserIdAndRoleId(userId, roleId);}/** * Method name: selectUserRole <BR> * Description: 跳转到选择用户角色页面 <BR> * * @return String<BR> */@RequestMapping("/selectUserRole")public String selectUserRole() {return "sa/selectUserRole";}/** * Method name: addUserRole <BR> * Description: 增加用户的角色 <BR> * * @param roleId * @param userIds * @return String<BR> */@RequestMapping("/addUserRole")@ResponseBodypublic String addUserRole(Integer roleId, String[] userIds) {return userRoleService.addUserRole(roleId, userIds);}/** * Method name: userAddPage <BR> * Description: 用户添加页面 <BR> * * @return String<BR> */@RequestMapping(value = "/userAddPage")public String userAddPage() {return "sa/userAdd";}/** * 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 Object<BR> */@RequestMapping("/getAllUserByLimit")@ResponseBodypublic Object getAllUserByLimit(UserParameter userParameter) {return userService.getAllUserByLimit(userParameter);}/** * Method name: getAllDelUserByLimit <BR> * Description: 获取所有删除用户 <BR> * * @param userParameter * @return Object<BR> */@RequestMapping("/getAllDelUserByLimit")@ResponseBodypublic Object getAllDelUserByLimit(UserParameter userParameter) {return userService.getAllDelUserByLimit(userParameter);}/** * Method name: delUser <BR> * Description: 批量删除用户 <BR> * * @param ids * @return String<BR> */@RequestMapping(value = "delUser")@ResponseBody@Transactionalpublic 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) {logger.error("根据用户id更新用户异常", e);TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();return "ERROR";}}/** * Method name: addUserPage <BR> * Description: 增加用户界面 <BR> * * @return String<BR> */@RequestMapping(value = "/addUserPage")public String addUserPage(Long userId, Model model) {model.addAttribute("manageUser", userId);if (null != userId) {User user = userService.selectByPrimaryKey(userId);model.addAttribute("manageUser", user);}return "sa/userAdd";}/** * Method name: checkUserId <BR> * Description: 检测用户账号是否存在 <BR> * * @param userId * @return User<BR> */@ResponseBody@RequestMapping("/checkUserId")public User checkUserId(Long userId) {return userService.selectByPrimaryKey(userId);}/** * Method name: addUser <BR> * Description: 用户添加 <BR> * * @param user * @return String<BR> */@ResponseBody@RequestMapping("/addUser")public String addUser(User user) {try {user.setPassword(MD5.md5(user.getPassword()));user.setCreateTime(new Date());userService.addUser(user);User u = userService.getUserByPhoneAndName(user.getPhone(), user.getName());String[] ids = new String[1];ids[0] = u.getId()+"";// 医生角色userRoleService.addUserRole(3, ids);return "SUCCESS";} catch (Exception e) {return "ERR";}}/** * Method name: updateUser <BR> * Description: 更新用户 <BR> * * @param user * @return String<BR> */@ResponseBody@RequestMapping("/updateUser")public String updateUser(User user, Long oldId) {return userService.updateUser(oldId, user);}/** * Method name: delUserPage <BR> * Description: 已删除用户列表 <BR> * * @return String<BR> */@RequestMapping("/delUserPage")public String delUserPage() {return "sa/userDelPage";} }

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435

6 、获取方式

大家点赞、收藏、关注、评论啦 获取联系方式,后台回复关键词:宠物

相关知识

基于springboot的宠物医院管理系统4的设计与实现 (含源码+sql+视频导入教程+文档)
基于SpringBoot的宠物医院管理系统设计与实现
基于SpringBoot开发的宠物医院预约管理系统
【网站项目】基于springboot的宠物医院预约管理系统
【开题报告】基于SpringBoot的宠物寄存商店管理系统的设计与实现
[1173]基于JAVA的宠物仪器设备智慧管理系统的设计与实现
迅德宠物医院管理系统
基于Spring Boot+Vue的宠物服务管理系统
基于Springboot+MYSQL+Maven实现的宠物医院管理系统(源码+数据库+运行指导文档+项目运行指导视频)
基于javaweb+mysql的ssm宠物医院管理系统(java+ssm+jquery+layui+js+mysql)

网址: 基于springboot的宠物医院管理系统4拥有多种角色,管理员可以自行对不同用户设置不同的角色权限,具体功能如下 : 用户管理、角色管理、权限管理、宠物管理、宠物病例管理、健康指南管理、健康图表分 https://m.mcbbbk.com/newsview304496.html

所属分类:萌宠日常
上一篇: 基于springboot+myb
下一篇: Kubernetes有状态应用管