diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java index cd3fa45..da3138a 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java @@ -794,4 +794,20 @@ public class PatientController { } return baseResponse; } + /** + * 修改患者密码/重置密码 + * @param doctor + * @return + */ + @PostMapping("updatePatientPassword") + public BaseResponse updatePatientPassword(LymsPatient patient){ + BaseResponse baseResponse=new BaseResponse(); + if(1==patient.getType()){//1 重置密码 + patient.setPpasswd(Constant.COMMON_PASSWD); + } + boolean f=lymsPatientService.updateById(patient); + baseResponse.setErrorcode(f==true?0:1); + baseResponse.setErrormsg(f==true?"成功":"失败"); + return baseResponse; + } } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPatient.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPatient.java index dde9607..a2a1a40 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPatient.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPatient.java @@ -106,6 +106,12 @@ public class LymsPatient implements Serializable { @TableField(value = "updatedtime") private Date updatedtime; + /** + * 修改/重置密码状态 0修改密码 1重置密码 + */ + @TableField(exist = false) + private Integer type; + @TableField(exist = false) private static final long serialVersionUID = 1L; // 小程序公众号上传的code