Commit a15626d5 by carrieyzzhang

limit channel campaignid query

parent 67643758
......@@ -943,20 +943,24 @@ public class EventServiceImpl implements EventService {
List<String> valueList = new ArrayList<>(set);
String values = String.join(",", set);
String url = Constant.trackingUrl + "/api/"+ appId +"/event/find/valuespecail?attrName=" + attrName + "&values=" + values;
String response = HttpClientUtil.doHttpGetRequest(url, "io");
if (!StringUtil.isEmpty(response)) {
try {
JSONObject ob = new JSONObject(response);
JSONObject content = ob.getJSONObject("content");
ObjectMapper mapper = new ObjectMapper();
result = mapper.readValue(content.toString(), Map.class);
} catch (Exception e) {
if (attrName.equals("_cid") || attrName.equals("_campaignid")) {
String values = String.join(",", set);
String url = Constant.trackingUrl + "/api/"+ appId +"/event/find/valuespecail?attrName=" + attrName + "&values=" + values;
String response = HttpClientUtil.doHttpGetRequest(url, "io");
if (!StringUtil.isEmpty(response)) {
try {
JSONObject ob = new JSONObject(response);
JSONObject content = ob.getJSONObject("content");
ObjectMapper mapper = new ObjectMapper();
result = mapper.readValue(content.toString(), Map.class);
} catch (Exception e) {
result.put("value", valueList);
}
} else {
result.put("value", valueList);
}
} else {
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