——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Node.js≥14
开发工具
后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可
❗没学过node.js的不要搞前后端分离项目
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明






基于javaweb的SpringBoot宠物医院在线系统(java+springboot+vue+mybatis+maven++mysql)
一、项目运行 环境配置:
Jdk1.8 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。
项目技术:
Spring + SpringBoot+ mybatis + Maven + Vue 等等组成,B/S模式 + 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
| return formService.petPercentage(); }
@GetMapping("/appointmentCount") @ApiOperation("近七天的预约数量") @OperationLogAnnotation(operModul = "统计报表模块-近七天的预约数量",operType = "近七天的预约数量",operDesc = "近七天的预约数量") public List<Map<String, Object>> appointmentCount() { return formService.appointmentCount(); }
@GetMapping("/healthCount") @ApiOperation("前七天的健康状况统计") @OperationLogAnnotation(operModul = "统计报表模块-前七天的健康状况统计",operType = "前七天的健康状况统计",operDesc = "前七天的健康状况统计") public List<Map<String, Object>> healthCount() { return formService.healthCount(); } }
@RestController @RequestMapping("/role") @Api("角色管理") public class RoleController { @Autowired private RoleService roleService;
@GetMapping("") @OperationLogAnnotation(operModul = "角色管理模块-查询角色",operType = "查询全部角色",operDesc = "查询全部角色") public List<RoleDTO> getAll() { return roleService.queryAll(); }
@PutMapping("") @OperationLogAnnotation(operModul = "角色管理模块-更新角色",operType = "更新角色",operDesc = "更新角色") public String updateRole(@RequestBody @Valid RoleDTO roleDTO) { return roleService.updateRole(roleDTO); }
@PostMapping("") @OperationLogAnnotation(operModul = "角色管理模块-添加角色",operType = "添加角色",operDesc = "添加角色") public String addRole(@RequestBody @Valid RoleDTO roleDTO) { return roleService.addRole(roleDTO); }
|
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
| * @param result 方法返回值 * @throws Throwable */ = "result", value = "operLogPoinCut()") public void saveOperLog(JoinPoint joinPoint, Object result) throws Throwable { RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes(); HttpServletRequest request = (HttpServletRequest) requestAttributes.resolveReference(RequestAttributes.REFERENCE_REQUEST); try { OperationLog operationLog = new OperationLog(); MethodSignature signature = (MethodSignature) joinPoint.getSignature(); Method method = signature.getMethod(); OperationLogAnnotation annotation = method.getAnnotation(OperationLogAnnotation.class); if (annotation != null) { operationLog.setModel(annotation.operModul()); operationLog.setType(annotation.operType()); operationLog.setDescription(annotation.operDesc()); } operationLog.setOperationTime(Timestamp.valueOf(sdf.format(new Date()))); UserDTO user = (UserDTO) BaseContextHolder.get("user"); if (user != null) operationLog.setUserCode(user.getUsername()); operationLog.setResult(result.toString()); logDao.insert(operationLog);
} catch (Exception e) { e.printStackTrace(); } }
}
|
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
|
@RestController @RequestMapping("/archives") @Api("宠物档案") public class ArchivesController { @Autowired private PetService petService;
@PostMapping("/findAll") @ApiOperation("查询全部宠物档案") @OperationLogAnnotation(operModul = "宠物档案模块-查询全部宠物档案",operType = "查询全部宠物档案",operDesc = "查询全部宠物档案") public List<PetDTO> findAll(@RequestBody @Valid PetQuery petQuery) { if (petQuery.getName() != null) petQuery.setName(petQuery.getName().trim()); if (petQuery.getUserName() != null) petQuery.setUserName(petQuery.getUserName().trim()); if (petQuery.getSpecies() != null) petQuery.setSpecies(petQuery.getSpecies().trim()); if (petQuery.getVarieties() != null) petQuery.setVarieties(petQuery.getVarieties().trim());
return petService.findPets(petQuery); }
@PostMapping("/findAll/noPage") @ApiOperation("查询全部宠物档案-无分页") public List<PetDTO> findAllNoPage(@RequestBody @Valid PetQuery petQuery) { return petService.findPetsNoPage(petQuery); }
@PostMapping("/add") @ApiOperation("添加宠物档案") @OperationLogAnnotation(operModul = "宠物档案模块-添加宠物档案",operType = "添加宠物档案",operDesc = "添加宠物档案") public String add(@RequestBody @Valid AddPetDto addPetDto) { return petService.addPet(addPetDto); }
@GetMapping("/findPet") @ApiOperation("通过id查询宠物档案") @OperationLogAnnotation(operModul = "宠物档案模块-通过id查询宠物档案",operType = "通过id查询宠物档案",operDesc = "通过id查询宠物档案")
|
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
| public String add(@RequestBody AddCaseRecordDTO addCaseRecordDTO) { return caseRecordService.addCaseRecord(addCaseRecordDTO); }
@PostMapping("/delete") @ApiOperation("删除宠物病例") @OperationLogAnnotation(operModul = "宠物病例模块-删除宠物病例",operType = "删除宠物病例",operDesc = "删除宠物病例") public String delete(Long id) { return caseRecordService.deleteCaseRecord(id); }
@GetMapping("/getByCaseId") @ApiOperation("查看详细病例") @OperationLogAnnotation(operModul = "宠物病例模块-查看详细病例",operType = "查看详细病例",operDesc = "查看详细病例") public AddCaseRecordDTO getByCaseId(Long id) { if (id == null) throw new BusinessException(ErrorCode.AUTHORITY_NOT_FOUND); return caseRecordService.findCaseRecordById(id); }
@PostMapping("/update") @ApiOperation("更新病例") @OperationLogAnnotation(operModul = "宠物病例模块-更新病例",operType = "更新病例",operDesc = "更新病例") public String update(@RequestBody @Valid AddCaseRecordDTO addCaseRecordDTO) { return caseRecordService.updateCaseRecord(addCaseRecordDTO); } }
|
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
| @Api("医生管理") public class DoctorController { @Autowired private DoctorService doctorService;
@GetMapping("") @ApiOperation("查询医生") @OperationLogAnnotation(operModul = "医生管理模块-查询医生",operType = "查询医生",operDesc = "查询医生") public List<DoctorDTO> doctorList(DoctorQuery doctorQuery) { return doctorService.commonQuery(doctorQuery); }
@PostMapping("") @ApiOperation("添加医生") @OperationLogAnnotation(operModul = "医生管理模块-添加医生",operType = "添加医生",operDesc = "添加医生") public String addDoctor(@RequestBody @Valid DoctorDTO doctorDTO) { return doctorService.addDoctor(doctorDTO); }
@PutMapping("") @ApiOperation("修改医生") @OperationLogAnnotation(operModul = "医生管理模块-修改医生",operType = "修改医生",operDesc = "修改医生") public String updateDoctor(@RequestBody @Valid DoctorDTO doctorDTO) { return doctorService.updateDoctor(doctorDTO); }
@DeleteMapping("") @ApiOperation("删除医生") @OperationLogAnnotation(operModul = "医生管理模块-删除医生",operType = "删除医生",operDesc = "删除医生") public String deleteDoctor(@RequestBody DoctorDTO doctorDTO) { return doctorService.deleteDoctor(doctorDTO); } }
@RestController @RequestMapping("/form") @Api("统计报表")
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=311023491103200yh
https://javayms.pages.dev?id=311023491103200yh