技术架构
后端:SpringBoot+SpringMVC+Mybatis-plus
前端:Vue+elemenet-ui+HTML+js+css+jquery+webpack
数据库:MySQL
功能模块
-
用户登录
-
医生管理
-
预约管理
-
管理员管理
-
患者管理
-
科室管理
-
药品管理
代码展示:
public ReturnMsg login(@RequestBody AdminDTO adminDTO) { if (adminDTO.getType() == 1) { Assert.isTrue(StrUtil.isNotEmpty(adminDTO.getUserName()) && StrUtil.isNotEmpty(adminDTO.getPassWord()), "账号或密码不能为空!"); LambdaQueryWrapper<AdminDTO> queryWrapper = Wrappers.lambdaQuery(); queryWrapper.eq(AdminDTO::getUserName, adminDTO.getUserName()). eq(AdminDTO::getPassWord, adminDTO.getPassWord()).last(BaseConstant.LIMIT_ONE); AdminDTO loginUser = adminService.getOne(queryWrapper); Assert.notNull(loginUser, "账号或密码错误!"); loginUser.setType(1); return ReturnMsg.ok(loginUser); } if (adminDTO.getType() == 2) { Assert.isTrue(StrUtil.isNotEmpty(adminDTO.getUserName()) && StrUtil.isNotEmpty(adminDTO.getPassWord()), "账号或密码不能为空!"); LambdaQueryWrapper<DoctorDTO> queryWrapper = Wrappers.lambdaQuery(); queryWrapper.eq(DoctorDTO::getUserName, adminDTO.getUserName()). eq(DoctorDTO::getPassWord, adminDTO.getPassWord()).last(BaseConstant.LIMIT_ONE); DoctorDTO loginUser = doctorService.getOne(queryWrapper); Assert.notNull(loginUser, "账号或密码错误!"); loginUser.setType(2); return ReturnMsg.ok(loginUser); } if (adminDTO.getType() == 3) { Assert.isTrue(StrUtil.isNotEmpty(adminDTO.getUserName()), "联系方式不能为空!"); LambdaQueryWrapper<SickInfoDTO> queryWrapper = Wrappers.lambdaQuery(); queryWrapper.eq(SickInfoDTO::getFamilyTel, adminDTO.getUserName()).last(BaseConstant.LIMIT_ONE); SickInfoDTO loginUser = sickInfoService.getOne(queryWrapper); if (loginUser == null) { loginUser = new SickInfoDTO(); loginUser.setFamilyTel(adminDTO.getUserName()); loginUser.setName("患者-游客"); sickInfoService.save(loginUser); } loginUser.setType(3); return ReturnMsg.ok(loginUser); } return ReturnMsg.error("账号或密码错误"); }