Commit c1b00b3fdac0a725fe7681b53ea8aadca2b4608e

Authored by shiyang
1 parent 8c25a1242f
Exists in master

医生重置密码

Showing 1 changed file with 18 additions and 0 deletions

talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DoctorController.java View file @ c1b00b3
... ... @@ -290,5 +290,23 @@
290 290  
291 291 return baseResponse;
292 292 }
  293 + /**
  294 + * 医生密码重置
  295 + * @param doctor
  296 + * @return
  297 + */
  298 + @PostMapping("updateDoctorPassword")
  299 + @TokenRequired
  300 + public BaseResponse updateDoctorPassword(@RequestBody LymsDoctor doctor){
  301 + BaseResponse baseResponse=new BaseResponse();
  302 +
  303 + if(StringUtil.isNotEmpty(doctor.getDpasswd())){
  304 + doctor.setDpasswd(DigestUtils.md5DigestAsHex(Constant.COMMON_PASSWD.getBytes()));
  305 + }
  306 + boolean f=lymsDoctorService.updateById(doctor);
  307 + baseResponse.setErrorcode(f==true?0:1);
  308 + baseResponse.setErrormsg(f==true?"成功":"失败");
  309 + return baseResponse;
  310 + }
293 311 }