Commit 659916a0e2e1c1bc45e29dc753e2581ec405cf1c
1 parent
c097549961
Exists in
master
患者重置密码bug
Showing 1 changed file with 60 additions and 3 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
View file @
659916a
... | ... | @@ -15,6 +15,7 @@ |
15 | 15 | import com.lyms.talkonlineweb.result.PatientPcaseResult; |
16 | 16 | import com.lyms.talkonlineweb.service.*; |
17 | 17 | import com.lyms.talkonlineweb.util.*; |
18 | +import com.mysql.cj.Query; | |
18 | 19 | import lombok.extern.log4j.Log4j2; |
19 | 20 | import org.springframework.beans.factory.annotation.Autowired; |
20 | 21 | import org.springframework.util.DigestUtils; |
... | ... | @@ -75,6 +76,8 @@ |
75 | 76 | |
76 | 77 | @Autowired //科室所拥有的疾病 |
77 | 78 | private LymsDepartillService lymsDepartillService; |
79 | + @Autowired | |
80 | + private LymsPatientAttentionService lymsPatientAttentionService; | |
78 | 81 | |
79 | 82 | /** |
80 | 83 | * 获取患者列表 |
... | ... | @@ -889,7 +892,7 @@ |
889 | 892 | |
890 | 893 | /** |
891 | 894 | * 修改患者密码/重置密码 |
892 | - * @param doctor | |
895 | + * @param patient | |
893 | 896 | * @return |
894 | 897 | */ |
895 | 898 | @PostMapping("updatePatientPassword") |
... | ... | @@ -898,8 +901,7 @@ |
898 | 901 | BaseResponse baseResponse=new BaseResponse(); |
899 | 902 | if(1==patient.getType()){//1 重置密码 |
900 | 903 | patient.setPpasswd(DigestUtils.md5DigestAsHex(Constant.COMMON_PASSWD.getBytes())); |
901 | - } | |
902 | - if(StringUtil.isNotEmpty(patient.getPpasswd())){ | |
904 | + }else{//修改 | |
903 | 905 | patient.setPpasswd(DigestUtils.md5DigestAsHex(patient.getPpasswd().getBytes())); |
904 | 906 | } |
905 | 907 | boolean f=lymsPatientService.updateById(patient); |
... | ... | @@ -934,5 +936,60 @@ |
934 | 936 | } |
935 | 937 | return baseResponse; |
936 | 938 | } |
939 | +// /** | |
940 | +// * 小程序关注患者查询 | |
941 | +// * | |
942 | +// * @param patient | |
943 | +// * @return | |
944 | +// */ | |
945 | +// @GetMapping("getPatientAttention") | |
946 | +// public BaseResponse getPatientAttention(LymsPatient patient) { | |
947 | +// QueryWrapper<LymsPatient> queryWrapper=new QueryWrapper<>(); | |
948 | +// if(StringUtil.isNotEmpty(patient.getIdno())){ | |
949 | +// queryWrapper.lambda().eq(LymsPatient::getIdno, patient.getIdno()); | |
950 | +// } | |
951 | +// if(StringUtil.isNotEmpty(patient.getEnrolmentPhone())){ | |
952 | +// queryWrapper.eq("p.enrolment_phone", patient.getEnrolmentPhone()) | |
953 | +// .or().eq("pc.mobile", patient.getEnrolmentPhone()); | |
954 | +// } | |
955 | +// //指定返回列 | |
956 | +// queryWrapper.lambda().select(LymsPatient::getId, | |
957 | +// LymsPatient::getPname, | |
958 | +// LymsPatient::getSex, | |
959 | +// LymsPatient::getBirth, | |
960 | +// LymsPatient::getIdno, | |
961 | +// LymsPatient::getCreatedtime); | |
962 | +// LymsPatient resultPatient = lymsPatientService.getPatient(queryWrapper); | |
963 | +// | |
964 | +// BaseResponse baseResponse = new BaseResponse(); | |
965 | +// baseResponse.setErrorcode(0); | |
966 | +// baseResponse.setObject(resultPatient); | |
967 | +// baseResponse.setErrormsg("成功"); | |
968 | +// return baseResponse; | |
969 | +// } | |
970 | +// | |
971 | +// /** | |
972 | +// * 小程序关注的患者列表 | |
973 | +// * | |
974 | +// * @param patient | |
975 | +// * @return | |
976 | +// */ | |
977 | +// @GetMapping("getPatientAttentionList") | |
978 | +// public BaseResponse getPatientAttentionList(LymsPatientAttention patientAttention) { | |
979 | +// BaseResponse baseResponse = new BaseResponse(); | |
980 | +// if (null==patientAttention.getPid()) { | |
981 | +// baseResponse.setErrorcode(1); | |
982 | +// baseResponse.setErrormsg("参数错误"); | |
983 | +// return baseResponse; | |
984 | +// } | |
985 | +// QueryWrapper<LymsPatientAttention> queryWrapper=Wrappers.query(patientAttention); | |
986 | +// //指定返回列 | |
987 | +// queryWrapper.lambda().select(LymsPatientAttention::getAttentionId); | |
988 | +// List<LymsPatient> ids=lymsPatientAttentionService.listObjs(queryWrapper); | |
989 | +// baseResponse.setErrorcode(0); | |
990 | +// baseResponse.setObject(ids); | |
991 | +// baseResponse.setErrormsg("成功"); | |
992 | +// return baseResponse; | |
993 | +// } | |
937 | 994 | } |