Commit e4a508f6834bfacd215a4aac21433f59e80e8b70
1 parent
d9275f03ce
Exists in
master
and in
1 other branch
小程序注册患者注册状态修改
Showing 1 changed file with 5 additions and 4 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
View file @
e4a508f
... | ... | @@ -938,8 +938,6 @@ |
938 | 938 | // @TokenRequired |
939 | 939 | public BaseResponse signInPatient(@RequestBody LymsPatient patient) { |
940 | 940 | BaseResponse baseResponse = new BaseResponse(); |
941 | - baseResponse.setErrorcode(1); | |
942 | - baseResponse.setErrormsg("身份证已注册。如有疑问请联系管理员!"); | |
943 | 941 | patient.setIdno(patient.getIdno().toLowerCase()); |
944 | 942 | LymsPatient tmpP=new LymsPatient(); |
945 | 943 | tmpP.setIdno(patient.getIdno().toLowerCase()); |
... | ... | @@ -950,8 +948,11 @@ |
950 | 948 | patient.setPpasswd(DigestUtils.md5DigestAsHex(patient.getPpasswd().getBytes())); |
951 | 949 | } |
952 | 950 | boolean f = lymsPatientService.save(patient); |
953 | - baseResponse.setErrorcode(0); | |
954 | - baseResponse.setErrormsg("注册成功!"); | |
951 | + baseResponse.setErrorcode(f?0:1); | |
952 | + baseResponse.setErrormsg(f?"注册成功!":"注册失败!"); | |
953 | + }else { | |
954 | + baseResponse.setErrorcode(2); | |
955 | + baseResponse.setErrormsg("身份证已注册!"); | |
955 | 956 | } |
956 | 957 | return baseResponse; |
957 | 958 | } |