Commit 70c2f1169b471bfebc24a712229aaa289c3f3d67
1 parent
423512ff2e
Exists in
master
患者修改/重置密码
Showing 2 changed files with 22 additions and 0 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
View file @
70c2f11
| ... | ... | @@ -794,5 +794,21 @@ |
| 794 | 794 | } |
| 795 | 795 | return baseResponse; |
| 796 | 796 | } |
| 797 | + /** | |
| 798 | + * 修改患者密码/重置密码 | |
| 799 | + * @param doctor | |
| 800 | + * @return | |
| 801 | + */ | |
| 802 | + @PostMapping("updatePatientPassword") | |
| 803 | + public BaseResponse updatePatientPassword(LymsPatient patient){ | |
| 804 | + BaseResponse baseResponse=new BaseResponse(); | |
| 805 | + if(1==patient.getType()){//1 重置密码 | |
| 806 | + patient.setPpasswd(Constant.COMMON_PASSWD); | |
| 807 | + } | |
| 808 | + boolean f=lymsPatientService.updateById(patient); | |
| 809 | + baseResponse.setErrorcode(f==true?0:1); | |
| 810 | + baseResponse.setErrormsg(f==true?"成功":"失败"); | |
| 811 | + return baseResponse; | |
| 812 | + } | |
| 797 | 813 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPatient.java
View file @
70c2f11
| ... | ... | @@ -106,6 +106,12 @@ |
| 106 | 106 | @TableField(value = "updatedtime") |
| 107 | 107 | private Date updatedtime; |
| 108 | 108 | |
| 109 | + /** | |
| 110 | + * 修改/重置密码状态 0修改密码 1重置密码 | |
| 111 | + */ | |
| 112 | + @TableField(exist = false) | |
| 113 | + private Integer type; | |
| 114 | + | |
| 109 | 115 | @TableField(exist = false) |
| 110 | 116 | private static final long serialVersionUID = 1L; |
| 111 | 117 | // 小程序公众号上传的code |