——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明




基于javaweb的SpringBoot宠物医院管理系统设计和实现(java+springboot+ssm+mysql+thymeleaf+html+maven)
一、项目简述
功能描叙: 医生信息,客户信息,宠物管理,浏览管理,诊断管理, 医生管理,用户管理等等模块。
二、项目运行
环境配置: Jdk1.8 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持)
项目技术: JSP +Springboot+ SpringMVC + MyBatis + ThymeLeaf + HTML+ JavaScript + JQuery + Ajax + maven等等
——————————CodeStart——————————
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
@RestController public class Forest_fileUploadController { Forest_PetsEntity forest_petsEntity = new Forest_PetsEntity(); Forest_VetDoctorEntity forest_vetDoctorEntity = new Forest_VetDoctorEntity(); @Autowired Forest_PetsService forest_petsService; @Autowired Forest_VetDoctorService forest_vetDoctorService;
@RequestMapping("upload") public Map fileUpload(@RequestParam MultipartFile file, String Forest_Pets_ID, HttpServletRequest request) { Map map = new HashMap(); boolean rs = false; if (!file.isEmpty()) { String fileName = System.currentTimeMillis() + file.getOriginalFilename(); forest_petsEntity.setForest_Pets_ID(Integer.parseInt(Forest_Pets_ID)); forest_petsEntity.setForest_Pets_Photo(fileName); forest_petsService.ForestPetsEntityUpdate(forest_petsEntity); String savePath = WebMvcConfig.uploadImagePath; File dest = new File(savePath + File.separator + fileName); try { file.transferTo(dest); rs = true; map.put("result", rs); } catch (IOException e) { e.printStackTrace(); map.put("result", rs); } } else if (file.isEmpty()) { map.put("result", rs); } return map; }
@RequestMapping("uploadAdministrator") public Map uploadAdministrator(@RequestParam MultipartFile file, String Forest_VetDoctor_ID, HttpServletRequest request) { Map map = new HashMap();
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| @RestController public class Forest_userCongtroller { private Map<String, Object> map = new HashMap<>(); private int count, num; @Autowired Forest_userService forest_userService; private Forest_variable Forest_variable = new Forest_variable(); private List<Forest_userEntity> list; @PostMapping("/login") public Map<String,Object> login(@RequestBody Forest_userEntity forest_userEntity, HttpSession session){ forest_userEntity.setForest_User_Grade(1); forest_userEntity.setForest_User_State(1); list=forest_userService.ForestUserEntityLogin(forest_userEntity); if(list.size()==0){ map.put("code",500); return map; } forest_userEntity.setForest_User_ID(list.get(0).getForest_User_ID()); session.setAttribute("num", 1); Forest_variable.variableName(session, forest_userEntity); map.put("code",200); return map; } @PostMapping("/UserLogin") public Map<String,Object> UserLogin(@RequestBody Forest_userEntity forest_userEntity, HttpSession session){ forest_userEntity.setForest_User_Grade(2); forest_userEntity.setForest_User_State(1); list=forest_userService.ForestUserEntityLogin(forest_userEntity); if(list.size()==0){ map.put("code",500); return map; } forest_userEntity.setForest_User_ID(list.get(0).getForest_User_ID()); session.setAttribute("num", 2);
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| } } package com.forest.demo.Controller;
@RestController public class Forest_HistoryRecordController { private Map<String, Object> map = new HashMap<>(); private int count, num; @Autowired private Forest_HistoryRecordService forest_historyRecordService;
@PostMapping("/ForestUserPetsEntitySelect") public Map<String, Object> ForestUserPetsEntitySelect(@RequestBody Forest_HistoryRecordEntity model, HttpServletRequest request) { num = count(model); if (new Forest_variable().variableNameSession(request) == 500) { map.put("code", 500); return map; } if (model.getNum() != 0) { int ss = model.getNum() * model.getSize(); model.setNum(ss); }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| int ss = model.getNum() * model.getSize(); model.setNum(ss); } List<Forest_VetDoctorEntity> list = forest_vetDoctorService.ForestVetDoctorEntitySearch(model); map.put("name", new Forest_variable().sessionName(request)); map.put("doctor", list); map.put("num", num); map.put("code", 200); return map; }
public int count1(Forest_VetDoctorEntity model) { count = forest_vetDoctorService.ForestVetDoctorEntitySearchRow(model); if (count % model.getSize() == 0) { num = count / model.getSize(); } else { num = count / model.getSize() + 1; } if (num >= 8) { return 8; } return num; } @PostMapping("/Forest_VetDoctorEntityDetails") public Map<String, Object> Forest_VetDoctorEntityDetails(@RequestBody Forest_VetDoctorEntity model, HttpServletRequest request) { if (new Forest_variable().variableNameSession(request) == 500) { map.put("code", 500); return map; } List<Forest_VetDoctorEntity> list = forest_vetDoctorService.Forest_VetDoctorEntityDetails(model); map.put("doctor", list);
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| @RestController public class Forest_CustomerController { private Map<String, Object> map = new HashMap<>(); private int count, num; @Autowired private Forest_CustomerService forest_customerService; @Autowired private Forest_Customer_PetsService forest_customer_petsService;
@RequestMapping("/ForestCustomerEntitySelect") public Map<String, Object> ForestCustomerEntitySelect(@RequestBody Forest_CustomerEntity model, HttpServletRequest request) { num = count(model); if (new Forest_variable().variableNameSession(request) == 500) { map.put("code", 500); return map; } if (model.getNum() != 0) { int ss = model.getNum() * model.getSize(); model.setNum(ss); }
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
public int sessionID(HttpServletRequest request) { HttpSession session = request.getSession(); Object userId = session.getAttribute("userId"); System.out.println(userId); int u= (int) userId; return u; }
@Override public int variableYeZhuNameSession(HttpServletRequest request) { HttpSession session = request.getSession(); String name = (String) session.getAttribute("username"); if(name==null) { return 500; } return 200; }
public String variableYeZhuName(HttpServletRequest request) { HttpSession session = request.getSession(); String name = (String) session.getAttribute("username"); return name; }
} package com.forest.demo.Controller;
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=251422312105200ie
https://javayms.pages.dev?id=251422312105200ie