Commit a15626d5 by carrieyzzhang

limit channel campaignid query

parent 67643758
...@@ -943,20 +943,24 @@ public class EventServiceImpl implements EventService { ...@@ -943,20 +943,24 @@ public class EventServiceImpl implements EventService {
List<String> valueList = new ArrayList<>(set); List<String> valueList = new ArrayList<>(set);
String values = String.join(",", set); if (attrName.equals("_cid") || attrName.equals("_campaignid")) {
String url = Constant.trackingUrl + "/api/"+ appId +"/event/find/valuespecail?attrName=" + attrName + "&values=" + values; String values = String.join(",", set);
String response = HttpClientUtil.doHttpGetRequest(url, "io"); String url = Constant.trackingUrl + "/api/"+ appId +"/event/find/valuespecail?attrName=" + attrName + "&values=" + values;
if (!StringUtil.isEmpty(response)) { String response = HttpClientUtil.doHttpGetRequest(url, "io");
try { if (!StringUtil.isEmpty(response)) {
JSONObject ob = new JSONObject(response); try {
JSONObject content = ob.getJSONObject("content"); JSONObject ob = new JSONObject(response);
ObjectMapper mapper = new ObjectMapper(); JSONObject content = ob.getJSONObject("content");
result = mapper.readValue(content.toString(), Map.class); ObjectMapper mapper = new ObjectMapper();
result = mapper.readValue(content.toString(), Map.class);
} catch (Exception e) {
} catch (Exception e) {
result.put("value", valueList);
}
} else {
result.put("value", valueList); result.put("value", valueList);
} }
} else { } else {
result.put("value", valueList); result.put("value", valueList);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment