修改1
parent
b603abf883
commit
f40574df00
|
@ -175,6 +175,7 @@ public class SysUserController extends BaseController
|
|||
//--------------邮箱注册医生--------------------------------------
|
||||
@PostMapping("/register/doctor")
|
||||
public Result<?> registerDoctor(@RequestBody Doctor doctor){
|
||||
userService.checkEmail(doctor.getEmail());
|
||||
Boolean flag = userService.registerDoctor(doctor);
|
||||
return Result.success(userService.registerDoctor(doctor));
|
||||
}
|
||||
|
@ -182,7 +183,8 @@ public class SysUserController extends BaseController
|
|||
|
||||
@PostMapping("/register/patient")
|
||||
public Result<?> registerPatient(@RequestBody Patient patient){
|
||||
Boolean flag = userService.registerPatient(patient);
|
||||
userService.checkEmail(patient.getEmail());
|
||||
Boolean flag = userService.registerPatient(patient);
|
||||
return Result.success(userService.registerPatient(patient));
|
||||
}
|
||||
|
||||
|
|
|
@ -229,4 +229,6 @@ public interface ISysUserService
|
|||
Patient selectPatient(Integer userId);
|
||||
//------------------------------查询医生信息
|
||||
Doctor selectDoctor(Integer userId);
|
||||
|
||||
void checkEmail(String email);
|
||||
}
|
||||
|
|
|
@ -637,7 +637,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
* @author 冯凯
|
||||
* @date: 2023/10/27 10:01
|
||||
*/
|
||||
private void checkEmail(String email) {
|
||||
public void checkEmail(String email) {
|
||||
User user=userMapper.checkEmail(email);
|
||||
System.out.println(user);
|
||||
Assert.isNull(user,
|
||||
|
|
Loading…
Reference in New Issue