Commit f874f4a2324b89eadf1ee9d2cd256c3457265bfc
1 parent
d7242be8b7
Exists in
master
and in
1 other branch
添加注册环信昵称
Showing 4 changed files with 6 additions and 4 deletions
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DoctorController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/util/HXService.java
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DoctorController.java
View file @
f874f4a
... | ... | @@ -157,7 +157,7 @@ |
157 | 157 | doctor=dLst.get(0); |
158 | 158 | |
159 | 159 | if(doctor.getHxid()==null ){ |
160 | - JSONObject json=hxService.addUser(doctor.getDlogin(),Constant.COMMON_PASSWD); | |
160 | + JSONObject json=hxService.addUser(doctor.getDlogin(),Constant.COMMON_PASSWD,doctor.getDname()+","+doctor.getHname()+","+doctor.getDdname()); | |
161 | 161 | JSONArray rArr=json.getJSONArray("entities"); |
162 | 162 | if(rArr.size()>0){ |
163 | 163 | doctor.setHxid(rArr.getJSONObject(0).getString("uuid")); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
View file @
f874f4a
... | ... | @@ -216,7 +216,7 @@ |
216 | 216 | patient.setIslogin(1); |
217 | 217 | |
218 | 218 | if(patient.getHxid()==null ){ |
219 | - JSONObject json=hxService.addUser(patient.getIdno(),Constant.COMMON_PASSWD); | |
219 | + JSONObject json=hxService.addUser(patient.getIdno(),Constant.COMMON_PASSWD,patient.getPname()); | |
220 | 220 | JSONArray rArr=json.getJSONArray("entities"); |
221 | 221 | if(rArr.size()>0){ |
222 | 222 | patient.setHxid(rArr.getJSONObject(0).getString("uuid")); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java
View file @
f874f4a
... | ... | @@ -75,7 +75,7 @@ |
75 | 75 | tMap.put("token",JWT); |
76 | 76 | |
77 | 77 | if(user.getHxid()==null && user.getHid()==null){ |
78 | - JSONObject json=hxService.addUser(user.getLogin(),Constant.COMMON_PASSWD); | |
78 | + JSONObject json=hxService.addUser(user.getLogin(),Constant.COMMON_PASSWD,"sys_"+user.getUname()); | |
79 | 79 | JSONArray rArr=json.getJSONArray("entities"); |
80 | 80 | if(rArr.size()>0){ |
81 | 81 | user.setHxid(rArr.getJSONObject(0).getString("uuid")); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/util/HXService.java
View file @
f874f4a
... | ... | @@ -93,7 +93,7 @@ |
93 | 93 | return user; |
94 | 94 | } |
95 | 95 | |
96 | - public JSONObject addUser(String username,String passwd){ | |
96 | + public JSONObject addUser(String username,String passwd,String nickname){ | |
97 | 97 | JSONObject rs=new JSONObject(); |
98 | 98 | Map<String,Object> param=new HashMap<>(); |
99 | 99 | HttpHeaders headers=new HttpHeaders(); |
100 | 100 | |
... | ... | @@ -103,7 +103,9 @@ |
103 | 103 | param.clear(); |
104 | 104 | param.put("username",username); |
105 | 105 | param.put("password",passwd); |
106 | + param.put("nickname",nickname); | |
106 | 107 | lParam.add(param); |
108 | + log.info("注册环信用户:"+param); | |
107 | 109 | HttpEntity entity=new HttpEntity(param,headers); |
108 | 110 | resp=restTemplate.postForEntity(getUrl()+"users",entity,String.class); |
109 | 111 | if (resp.getStatusCodeValue()==200){ |