Commit 128c8b7a4bfaec5d0cae1642a25b015afc2217fb
1 parent
4f159d4421
Exists in
master
修改患者登录
Showing 1 changed file with 6 additions and 4 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
View file @
128c8b7
... | ... | @@ -223,12 +223,10 @@ |
223 | 223 | baseResponse.setErrorcode(1); |
224 | 224 | if (dLst.size()>0) { |
225 | 225 | patient=dLst.get(0); |
226 | - patient.setPpasswd(null); | |
227 | - baseResponse.setObject(patient); | |
226 | + | |
228 | 227 | String jwt = JwtUtils.createJWT("1", patient.getIdno(), Constant.JWT_TTL); |
229 | 228 | Map<String,Object> map=new HashMap<>(); |
230 | - map.put("patient",patient); | |
231 | - map.put("token",jwt); | |
229 | + | |
232 | 230 | patient.setIslogin(1); |
233 | 231 | |
234 | 232 | if(patient.getHxid()==null ){ |
... | ... | @@ -240,6 +238,9 @@ |
240 | 238 | } |
241 | 239 | |
242 | 240 | lymsPatientService.update().update(patient); |
241 | + patient.setPpasswd(null); | |
242 | + map.put("patient",patient); | |
243 | + map.put("token",jwt); | |
243 | 244 | baseResponse.setErrorcode(0); |
244 | 245 | baseResponse.setObject(map); |
245 | 246 | LymsLogs logEntity=new LymsLogs(); |
... | ... | @@ -247,6 +248,7 @@ |
247 | 248 | logEntity.setLogDate(new Date()); |
248 | 249 | logEntity.setMessage(String.format("login:%s name:%s",patient.getIdno(),patient.getPname())); |
249 | 250 | lymsLogsService.save(logEntity); |
251 | + | |
250 | 252 | } |
251 | 253 | return baseResponse; |
252 | 254 | } |