修改user
parent
bc05345dcc
commit
c948d0f41e
|
@ -175,14 +175,20 @@ public class SysUserController extends BaseController
|
|||
//--------------邮箱注册医生--------------------------------------
|
||||
@PostMapping("/register/doctor")
|
||||
public Result<?> registerDoctor(@RequestBody Doctor doctor){
|
||||
userService.checkEmailUnique(doctor);
|
||||
if (!userService.checkEmailUnique(doctor))
|
||||
{
|
||||
return Result.error("邮箱'" + doctor.getEmail() + "'已注册");
|
||||
}
|
||||
return Result.success(userService.registerDoctor(doctor));
|
||||
}
|
||||
//-------------------------------------------------------------------------------
|
||||
|
||||
@PostMapping("/register/patient")
|
||||
public Result<?> registerPatient(@RequestBody Patient patient){
|
||||
userService.checkEmailUnique(patient);
|
||||
if (!userService.checkEmailUnique(patient))
|
||||
{
|
||||
return Result.error("邮箱'" + patient.getEmail() + "'已注册");
|
||||
}
|
||||
return Result.success(userService.registerPatient(patient));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue