diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DoctorController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DoctorController.java index b15667e..b1e71db 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DoctorController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DoctorController.java @@ -290,4 +290,22 @@ public class DoctorController { return baseResponse; } + /** + * 医生密码重置 + * @param doctor + * @return + */ + @PostMapping("updateDoctorPassword") + @TokenRequired + public BaseResponse updateDoctorPassword(@RequestBody LymsDoctor doctor){ + BaseResponse baseResponse=new BaseResponse(); + + if(StringUtil.isNotEmpty(doctor.getDpasswd())){ + doctor.setDpasswd(DigestUtils.md5DigestAsHex(Constant.COMMON_PASSWD.getBytes())); + } + boolean f=lymsDoctorService.updateById(doctor); + baseResponse.setErrorcode(f==true?0:1); + baseResponse.setErrormsg(f==true?"成功":"失败"); + return baseResponse; + } }