|
|
@@ -64,7 +64,7 @@ public class EventController {
|
|
|
String apiPath = "/api/eventService/v1/eventSubscriptionByEventTypes";
|
|
|
JsonObject paramJson = new JsonObject();
|
|
|
paramJson.add("eventTypes", eventList);
|
|
|
- paramJson.addProperty("eventDest", "http://10.150.10.139:8888/event/receive");
|
|
|
+ paramJson.addProperty("eventDest", "http://ff.cf.yingcaibx.com/event/receive");
|
|
|
|
|
|
String response = apiUtil.doPost(apiPath, paramJson.toString(), null);
|
|
|
log.info("Subscribe response: {}", response);
|
|
|
@@ -81,4 +81,20 @@ public class EventController {
|
|
|
|
|
|
return response;
|
|
|
}
|
|
|
+
|
|
|
+ @PostMapping("/cancel")
|
|
|
+ @ApiOperation(value = "取消已订阅事件")
|
|
|
+ public String cancelEvent() {
|
|
|
+ ApiUtil apiUtil = new ApiUtil();
|
|
|
+ JsonArray eventList = new JsonArray();
|
|
|
+ eventList.add(196893);
|
|
|
+ eventList.add(1157632001);
|
|
|
+ JsonObject paramJson = new JsonObject();
|
|
|
+ paramJson.add("eventTypes", eventList);
|
|
|
+ String apiPath = "/api/eventService/v1/eventUnSubscriptionByEventTypes";
|
|
|
+ String response = apiUtil.doPost(apiPath, paramJson.toString(), null);
|
|
|
+ System.out.println("output: " + response);
|
|
|
+
|
|
|
+ return response;
|
|
|
+ }
|
|
|
}
|