• 基于springboot宠物医院管理系统java源码


    宠物医院管理系统是基于java编程语言,mysql管理器,springboot框架的设计,本系统主要分为用户,管理员,医生三个角色,其中用户的主要功能是注册和登陆系统,查看新闻资讯,预约宠物医生,购买药品,在线留言反馈,查看订单;宠物医生主要功能是登陆系统,对预约挂号管理,遗嘱管理;管理员则是对用户,医生,订单,科室,预约挂号,药品,订单,留言板等信息进行管理。本设计功能齐全,页面简洁,


    jdk版本:1.8 及以上
    ide工具:IDEA
    数据库: mysql5.7 (必须5.7)
    编程语言: Java
    tomcat:   8.0 及以上
    java框架:springboot
    maven: 3.6.1
    前端:layui
    详细技术:HTML+CSS+JS+JSP+JAVA+springboot+MYSQL+JQUERY+MAVEN


    基于springboot宠物医院管理系统

     


    系统分为用户,医生,管理员三个角色


    用户的主要功能有:

    1.用户注册和登陆系统

    2.用户查看新闻资讯

    3.用户查看宠物医学知识

    4.用户查看医生信息,能够在线预约医生

    5.用户查看药品信息,在线购买药品

    6.用户在线留言反馈

    7.用户个人中心修改个人资料,修改密码

    8.用户查看自己的预约信息,查看预约审核状态

    9.用户查看自己购买的药品订单

    10.退出登陆


    宠物医生的主要功能有:

    1.医生输入账户登陆系统

    2.个人中心,医生修改密码和个人信息

    3.预约挂号管理,对用户的挂号进行审核,回复,医嘱,查询

    4.遗嘱管理,查看对用户回复的遗嘱信息

    5.退出登陆


    管理员的主要功能有:

    1.管理员输入账户登陆后台

    2.个人中心,管理员修改密码和账户信息

    3.医生管理,对医生的信息进行添加,修改,删除,查询

    4.用户管理,对注册的用户信息进行添加,修改,删除,查询

    5.医学知识管理,对医学知识信息进行添加,修改,删除,查询

    6.科室管理,对宠物医院的科室信息进行添加,修改,查询,删除

    7.预约挂号管理,对医生预约的挂号信息进行管理

    8.遗嘱信息管理,对遗嘱信息进行查询,修改,删除

    9.药品信息管理,对宠物药品信息进行添加,修改,查询,删除

    10.订单信息管理,对用户购买的药品订单信息进行查看,修改,删除,统计

    11.留言板管理,对用户发布的留言信息进行删除,回复,修改,查询

    12.系统设置,对新闻资讯和轮播图进行管理

    13.退出信息

    1. package com.controller;
    2. import java.util.Arrays;
    3. import java.util.Calendar;
    4. import java.util.Date;
    5. import java.util.Map;
    6. import javax.servlet.http.HttpServletRequest;
    7. import org.springframework.beans.factory.annotation.Autowired;
    8. import org.springframework.stereotype.Controller;
    9. import org.springframework.web.bind.annotation.GetMapping;
    10. import org.springframework.web.bind.annotation.PathVariable;
    11. import org.springframework.web.bind.annotation.PostMapping;
    12. import org.springframework.web.bind.annotation.RequestBody;
    13. import org.springframework.web.bind.annotation.RequestMapping;
    14. import org.springframework.web.bind.annotation.RequestParam;
    15. import org.springframework.web.bind.annotation.ResponseBody;
    16. import org.springframework.web.bind.annotation.RestController;
    17. import com.annotation.IgnoreAuth;
    18. import com.baomidou.mybatisplus.mapper.EntityWrapper;
    19. import com.entity.TokenEntity;
    20. import com.entity.UserEntity;
    21. import com.service.TokenService;
    22. import com.service.UserService;
    23. import com.utils.CommonUtil;
    24. import com.utils.MPUtil;
    25. import com.utils.PageUtils;
    26. import com.utils.R;
    27. import com.utils.ValidatorUtils;
    28. /**
    29. * 登录相关
    30. */
    31. @RequestMapping("users")
    32. @RestController
    33. public class UserController{
    34. @Autowired
    35. private UserService userService;
    36. @Autowired
    37. private TokenService tokenService;
    38. /**
    39. * 登录
    40. */
    41. @IgnoreAuth
    42. @PostMapping(value = "/login")
    43. public R login(String username, String password, String captcha, HttpServletRequest request) {
    44. UserEntity user = userService.selectOne(new EntityWrapper().eq("username", username));
    45. if(user==null || !user.getPassword().equals(password)) {
    46. return R.error("账号或密码不正确");
    47. }
    48. String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
    49. return R.ok().put("token", token);
    50. }
    51. /**
    52. * 注册
    53. */
    54. @IgnoreAuth
    55. @PostMapping(value = "/register")
    56. public R register(@RequestBody UserEntity user){
    57. // ValidatorUtils.validateEntity(user);
    58. if(userService.selectOne(new EntityWrapper().eq("username", user.getUsername())) !=null) {
    59. return R.error("用户已存在");
    60. }
    61. userService.insert(user);
    62. return R.ok();
    63. }
    64. /**
    65. * 退出
    66. */
    67. @GetMapping(value = "logout")
    68. public R logout(HttpServletRequest request) {
    69. request.getSession().invalidate();
    70. return R.ok("退出成功");
    71. }
    72. /**
    73. * 密码重置
    74. */
    75. @IgnoreAuth
    76. @RequestMapping(value = "/resetPass")
    77. public R resetPass(String username, HttpServletRequest request){
    78. UserEntity user = userService.selectOne(new EntityWrapper().eq("username", username));
    79. if(user==null) {
    80. return R.error("账号不存在");
    81. }
    82. user.setPassword("123456");
    83. userService.update(user,null);
    84. return R.ok("密码已重置为:123456");
    85. }
    86. /**
    87. * 列表
    88. */
    89. @RequestMapping("/page")
    90. public R page(@RequestParam Map params,UserEntity user){
    91. EntityWrapper ew = new EntityWrapper();
    92. PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
    93. return R.ok().put("data", page);
    94. }
    95. /**
    96. * 列表
    97. */
    98. @RequestMapping("/list")
    99. public R list( UserEntity user){
    100. EntityWrapper ew = new EntityWrapper();
    101. ew.allEq(MPUtil.allEQMapPre( user, "user"));
    102. return R.ok().put("data", userService.selectListView(ew));
    103. }
    104. /**
    105. * 信息
    106. */
    107. @RequestMapping("/info/{id}")
    108. public R info(@PathVariable("id") String id){
    109. UserEntity user = userService.selectById(id);
    110. return R.ok().put("data", user);
    111. }
    112. /**
    113. * 获取用户的session用户信息
    114. */
    115. @RequestMapping("/session")
    116. public R getCurrUser(HttpServletRequest request){
    117. Long id = (Long)request.getSession().getAttribute("userId");
    118. UserEntity user = userService.selectById(id);
    119. return R.ok().put("data", user);
    120. }
    121. /**
    122. * 保存
    123. */
    124. @PostMapping("/save")
    125. public R save(@RequestBody UserEntity user){
    126. // ValidatorUtils.validateEntity(user);
    127. if(userService.selectOne(new EntityWrapper().eq("username", user.getUsername())) !=null) {
    128. return R.error("用户已存在");
    129. }
    130. userService.insert(user);
    131. return R.ok();
    132. }
    133. /**
    134. * 修改
    135. */
    136. @RequestMapping("/update")
    137. public R update(@RequestBody UserEntity user){
    138. // ValidatorUtils.validateEntity(user);
    139. UserEntity u = userService.selectOne(new EntityWrapper().eq("username", user.getUsername()));
    140. if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {
    141. return R.error("用户名已存在。");
    142. }
    143. userService.updateById(user);//全部更新
    144. return R.ok();
    145. }
    146. /**
    147. * 删除
    148. */
    149. @RequestMapping("/delete")
    150. public R delete(@RequestBody Long[] ids){
    151. userService.deleteBatchIds(Arrays.asList(ids));
    152. return R.ok();
    153. }
    154. }

  • 相关阅读:
    图像处理ASIC设计方法 笔记5 图像卷积器硬件结构
    全球领先飞瞳引擎™云服务全球两千+企业用户,集装箱识别集装箱箱况残损检测,正常箱号识别率99.98%以上,箱信息识别及铅封识别免费
    balenaEtcher格式化的U盘恢复原来样子
    腾讯云标准型S5服务器五年优惠价格表(4核8G和2核4G)
    Winnovative Word To PDF Converter for .NET
    动作捕捉(Motion Capture)文件BVH的解读笔记
    社团管理系统网站(php+mysql)
    双周赛114(模拟、枚举 + 哈希、DFS)
    三年后端开发: 拿下阿里 / 腾讯 / 美团等四个大厂的 Offer 后,总结如下
    一次端口映射练习
  • 原文地址:https://blog.csdn.net/QQ58850198/article/details/126005061