mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-10 19:36:50 +08:00
受众
This commit is contained in:
@@ -44,7 +44,7 @@ public class OutSideDataServiceImpl implements IOutSideDataService {
|
||||
String token = TokenProxy.getToken(request);
|
||||
String type="application/json";
|
||||
String[] headers=new String[] {"token",token,"Content-Type",type};
|
||||
String url= getBaseUrl("/audience/memberList");
|
||||
String url= getBaseUrl("/audience/members");
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("audienceId", audienceId);
|
||||
String json = null;
|
||||
@@ -56,14 +56,13 @@ public class OutSideDataServiceImpl implements IOutSideDataService {
|
||||
String responseStr = okHttpUtil.doPostJson(url, json, headers);
|
||||
JsonNode rootNode= mapper.readTree(responseStr);
|
||||
|
||||
JsonNode result = rootNode.get("result")!=null ? ( rootNode.get("result").get("data") !=null ? rootNode.get("result").get("data"):null):null;
|
||||
JsonNode result = rootNode.get("result");
|
||||
if(result!=null && result.isArray()) {
|
||||
//这里应该是单独的线程去处理
|
||||
for(JsonNode JsonNode :result) {
|
||||
for(JsonNode node :result) {
|
||||
AudienceUser au=new AudienceUser();
|
||||
au.setId(JsonNode.get("id").asText());
|
||||
au.setName(getNodeText(JsonNode.get("userName")));
|
||||
au.setCode(getNodeText(JsonNode.get("userNo")));
|
||||
au.setId(node.get("userId").asText());
|
||||
au.setName(getNodeText(node.get("name")));
|
||||
au.setCode(getNodeText(node.get("userNo")));
|
||||
list.add(au);
|
||||
}
|
||||
}
|
||||
@@ -222,10 +221,10 @@ public class OutSideDataServiceImpl implements IOutSideDataService {
|
||||
//// }catch (Exception e){
|
||||
//// log.error("获取当前用户有权限的机构id错误",e);
|
||||
//// }
|
||||
// String token="eyJ0eXBlIjoidG9rZW4iLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC91LmJvZS5jb20iLCJpYXQiOjE2NzUzMTY3OTMsImV4cCI6MTY3NTMyMzk5MywiR2l2ZW5OYW1lIjoiYm9ldSIsInVzZXJJZCI6IjdFMDY1NzQxLTkzRUItRTc1Ni02Mzk5LUIwQTA1QUY2NEE3OSIsInVJZCI6Ijk2NTM2OTU4MjM5Mjk3MTI2NCIsInBlcm1pc3Npb24iOiIifQ==.75814a454f8a022cbe24f29eb956b5350f1212fc105b951df8bc2a82975a05a4";
|
||||
// String url= "https://u.boe.com/userbasic/audience/memberList";
|
||||
// String token="eyJhbGciOiJIUzI1NiIsInR5cGUiOiJ0b2tlbiJ9.eyJpc3MiOiJodHRwOi8vdS5ib2UuY29tIiwiR2l2ZW5OYW1lIjoiYm9ldSIsInVJZCI6OTY1MzQyMDI3NDk3NjA3MTY4LCJ1c2VySWQiOiI2QjA0OUZBRi1DMzE0LTdDQ0YtMEQyOC0wRDIzRjRDNDI1MzEiLCJleHAiOjE2NzUzMzUxNTU3MTZ9.d9f78b2c6bac6001f732015f509eff04f50c6a426e7c01f259f884c8da6ac92c";
|
||||
// String url= "https://u-pre.boe.com/userbasic/audience/members";
|
||||
// Map<String, String> params = new HashMap<>();
|
||||
// params.put("audienceId", "70061506155860912129");
|
||||
// params.put("audienceId", "7008604893867151361");
|
||||
// String json = null;
|
||||
// List<AudienceUser> list=new ArrayList<AudienceUser>();
|
||||
// ObjectMapper mapper=new ObjectMapper();
|
||||
@@ -238,14 +237,14 @@ public class OutSideDataServiceImpl implements IOutSideDataService {
|
||||
// System.out.println(responseStr);
|
||||
// JsonNode rootNode= mapper.readTree(responseStr);
|
||||
//
|
||||
// JsonNode result = rootNode.get("result")!=null ? ( rootNode.get("result").get("data") !=null ? rootNode.get("result").get("data"):null):null;
|
||||
// JsonNode result = rootNode.get("result");
|
||||
// if(result!=null && result.isArray()) {
|
||||
// //这里应该是单独的线程去处理
|
||||
// for(JsonNode JsonNode :result) {
|
||||
// for(JsonNode node :result) {
|
||||
// AudienceUser au=new AudienceUser();
|
||||
// au.setId(JsonNode.get("id").asText());
|
||||
// au.setName(JsonNode.get("userName").asText());
|
||||
// au.setCode(JsonNode.get("userNo").asText());
|
||||
// au.setId(node.get("userId").asText());
|
||||
// au.setName(node.get("name").asText());
|
||||
// au.setCode(node.get("userNo").asText());
|
||||
// list.add(au);
|
||||
// System.out.println(au.getName());
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user