|
@@ -47,7 +47,14 @@ public class WorkWxUtils {
|
47
|
47
|
params.put("limit", 10);
|
48
|
48
|
JSONObject result = post("/cgi-bin/living/get_user_all_livingid", params);
|
49
|
49
|
JSONArray lst = result.getJSONArray("livingid_list");
|
50
|
|
- return lst.size() > 0 ? (String) lst.get(0) : null;
|
|
50
|
+ String livingId = lst.size() > 0 ? (String) lst.get(0) : null;
|
|
51
|
+
|
|
52
|
+// if (!StringUtils.isEmpty(livingId)) {
|
|
53
|
+// JSONObject res = post("/cgi-bin/living/get_living_info?livingid="+StringUtils.urlEncode(livingId), null);
|
|
54
|
+// System.out.println(res);
|
|
55
|
+// }
|
|
56
|
+
|
|
57
|
+ return livingId;
|
51
|
58
|
} catch (WxErrorException e) {
|
52
|
59
|
if (90601 == e.getError().getErrorCode()) {
|
53
|
60
|
throw new Exception("直播房间不存在");
|
|
@@ -92,7 +99,7 @@ public class WorkWxUtils {
|
92
|
99
|
|
93
|
100
|
private JSONObject post(String url, JSONObject data) throws WxErrorException {
|
94
|
101
|
String uri = wxCpService.getWxCpConfigStorage().getApiUrl(url);
|
95
|
|
- String response = wxCpService.post(uri, data.toJSONString());
|
|
102
|
+ String response = wxCpService.post(uri, null != data ? data.toJSONString() : null);
|
96
|
103
|
return JSONObject.parseObject(response);
|
97
|
104
|
}
|
98
|
105
|
}
|