From c1b00b3fdac0a725fe7681b53ea8aadca2b4608e Mon Sep 17 00:00:00 2001 From: shiyang <316555390@qq.com> Date: Thu, 7 Apr 2022 13:54:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BB=E7=94=9F=E9=87=8D=E7=BD=AE=E5=AF=86?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../talkonlineweb/controller/DoctorController.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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; + } } -- 1.8.3.1