Commit adc8ac3a31bed54ae16d0cd76f5df79362afc3c7
1 parent
4f014994dd
Exists in
master
恢复环信注册功能/环信配置改为demo
Showing 4 changed files with 36 additions and 36 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/TkRecordController.java
- talkonlineweb/src/main/resources/application-dev.yml
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DoctorController.java
View file @
adc8ac3
... | ... | @@ -126,15 +126,15 @@ |
126 | 126 | baseResponse.setErrorcode(1); |
127 | 127 | return baseResponse; |
128 | 128 | } |
129 | -// LymsHdepart hdepart=lymsHdepartService.getById(doctor.getDpid()); | |
130 | -// if(doctor.getHxid()==null ){ | |
131 | -// JSONObject json=hxService.addUser(doctor.getDlogin(),Constant.COMMON_PASSWD,doctor.getDname()+","+hdepart.getDname()+","+hdepart.getHname()); | |
132 | -// JSONArray rArr=json.getJSONArray("entities"); | |
133 | -// if(rArr.size()>0){ | |
134 | -// doctor.setHxid(rArr.getJSONObject(0).getString("uuid")); | |
135 | -// } | |
136 | -//// lymsDoctorService.saveOrUpdate(doctor); | |
137 | -// } | |
129 | + LymsHdepart hdepart=lymsHdepartService.getById(doctor.getDpid()); | |
130 | + if(doctor.getHxid()==null ){ | |
131 | + JSONObject json=hxService.addUser(doctor.getDlogin(),Constant.COMMON_PASSWD,doctor.getDname()+","+hdepart.getDname()+","+hdepart.getHname()); | |
132 | + JSONArray rArr=json.getJSONArray("entities"); | |
133 | + if(rArr.size()>0){ | |
134 | + doctor.setHxid(rArr.getJSONObject(0).getString("uuid")); | |
135 | + } | |
136 | +// lymsDoctorService.saveOrUpdate(doctor); | |
137 | + } | |
138 | 138 | }else{ |
139 | 139 | did=1; |
140 | 140 | doctor.setUpdatedTime(new Date()); |
... | ... | @@ -166,10 +166,10 @@ |
166 | 166 | public BaseResponse delDoctor(LymsDoctor doctor){ |
167 | 167 | BaseResponse baseResponse=new BaseResponse(); |
168 | 168 | boolean f=lymsDoctorService.removeById(doctor.getDid()); |
169 | -// if (f){ | |
170 | -// JSONObject rs=hxService.delUser(doctor.getDlogin()); | |
171 | -// log.info(rs); | |
172 | -// } | |
169 | + if (f){ | |
170 | + JSONObject rs=hxService.delUser(doctor.getDlogin()); | |
171 | + log.info(rs); | |
172 | + } | |
173 | 173 | //保存操作记录 |
174 | 174 | lymsLogsCrud(doctor,null); |
175 | 175 | baseResponse.setErrorcode(f==true?0:1); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
View file @
adc8ac3
... | ... | @@ -373,13 +373,13 @@ |
373 | 373 | |
374 | 374 | if (StringUtils.isEmpty(patient2.getHxid()) || StringUtils.isEmpty(patient2.getOpenid())) { |
375 | 375 | |
376 | -// if (patient2.getHxid() == null) { | |
377 | -// JSONObject json = hxService.addUser(patient2.getIdno(), Constant.COMMON_PASSWD, patient2.getPname()); | |
378 | -// JSONArray rArr = json.getJSONArray("entities"); | |
379 | -// if (rArr.size() > 0) { | |
380 | -// patient2.setHxid(rArr.getJSONObject(0).getString("uuid")); | |
381 | -// } | |
382 | -// } | |
376 | + if (patient2.getHxid() == null) { | |
377 | + JSONObject json = hxService.addUser(patient2.getIdno(), Constant.COMMON_PASSWD, patient2.getPname()); | |
378 | + JSONArray rArr = json.getJSONArray("entities"); | |
379 | + if (rArr.size() > 0) { | |
380 | + patient2.setHxid(rArr.getJSONObject(0).getString("uuid")); | |
381 | + } | |
382 | + } | |
383 | 383 | if (StringUtils.isEmpty(patient2.getOpenid())) { |
384 | 384 | patient2.setOpenid(WeiXinUtil.getWxOpenId(patient.getCode())); |
385 | 385 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/TkRecordController.java
View file @
adc8ac3
... | ... | @@ -82,10 +82,10 @@ |
82 | 82 | group.setTarget(doctor.getDlogin()); |
83 | 83 | group.setOwnerk("test"); |
84 | 84 | |
85 | -// log.info("创建环信组:{} from:{} target:{}", group.getOwnerk(), group.getFromp(), group.getTarget()); | |
86 | -// JSONObject rJson = hxService.addChatGroups(group.getFromp() + "," + group.getTarget(), group.getOwnerk(), new String[]{group.getFromp(), group.getTarget()}); | |
87 | -// log.info("rJson:" + rJson); | |
88 | -// group.setHxgroupid(rJson.getJSONObject("data").getString("groupid")); | |
85 | + log.info("创建环信组:{} from:{} target:{}", group.getOwnerk(), group.getFromp(), group.getTarget()); | |
86 | + JSONObject rJson = hxService.addChatGroups(group.getFromp() + "," + group.getTarget(), group.getOwnerk(), new String[]{group.getFromp(), group.getTarget()}); | |
87 | + log.info("rJson:" + rJson); | |
88 | + group.setHxgroupid(rJson.getJSONObject("data").getString("groupid")); | |
89 | 89 | group.setDescription(group.getFromp() + "," + group.getTarget()); |
90 | 90 | // group.setGroupname(group.getFromp() + "," + group.getTarget()); |
91 | 91 |
talkonlineweb/src/main/resources/application-dev.yml
View file @
adc8ac3
... | ... | @@ -13,21 +13,21 @@ |
13 | 13 | #imgUrlPre: http://192.168.2.26:9090/art/showPic/ |
14 | 14 | |
15 | 15 | |
16 | -##环信配置(原始开发环境,不用了) | |
17 | -#hx.APPKEY: 1135210903239178#demo | |
18 | -#hx.ClientID: YXA65kqQUy4pQaqHb3pwXwfnrA | |
19 | -#hx.ClientSecret: YXA6RZaIr68MPPLcvqUnYxpqEkAEj6w | |
20 | -#hx.org_name: 1135210903239178 | |
21 | -#hx.app_name: demo | |
16 | +##环信配置(公司账号,暂时不用了) | |
17 | +#hx.APPKEY: 1123170414115195#talkonline | |
18 | +#hx.ClientID: YXA63Zp2DnLaTuyE0px-g4_8Cw | |
19 | +#hx.ClientSecret: YXA6Ml0jgv7w9PaN0WmTc8irMWX4dNg | |
20 | +#hx.org_name: 1123170414115195 | |
21 | +#hx.app_name: talkonline | |
22 | 22 | #hx.hxuser: test |
23 | 23 | #hx.hxpasswd: passwd |
24 | 24 | |
25 | -#环信配置 | |
26 | -hx.APPKEY: 1123170414115195#talkonline | |
27 | -hx.ClientID: YXA63Zp2DnLaTuyE0px-g4_8Cw | |
28 | -hx.ClientSecret: YXA6Ml0jgv7w9PaN0WmTc8irMWX4dNg | |
29 | -hx.org_name: 1123170414115195 | |
30 | -hx.app_name: talkonline | |
25 | +#环信配置(测试demo) | |
26 | +hx.APPKEY: 1123220513107089#demo | |
27 | +hx.ClientID: YXA6IsD4iz8dT_OD3033c4ak9A | |
28 | +hx.ClientSecret: YXA6X8ZXDXVIxyixnkeCa5Ep0jX-XMw | |
29 | +hx.org_name: 1123220513107089 | |
30 | +hx.app_name: demo | |
31 | 31 | hx.hxuser: test |
32 | 32 | hx.hxpasswd: passwd |
33 | 33 |