Authored by mali

测试入influxdb的代码

@@ -5,8 +5,13 @@ import com.yohobuy.ufo.model.order.common.TabType; @@ -5,8 +5,13 @@ import com.yohobuy.ufo.model.order.common.TabType;
5 import com.yohobuy.ufo.model.order.req.*; 5 import com.yohobuy.ufo.model.order.req.*;
6 import com.yohobuy.ufo.model.order.resp.*; 6 import com.yohobuy.ufo.model.order.resp.*;
7 import com.yohoufo.common.ApiResponse; 7 import com.yohoufo.common.ApiResponse;
  8 +import com.yohoufo.common.alarm.EventBusPublisher;
  9 +import com.yohoufo.common.alarm.UfoInfluxdbEvent;
  10 +import com.yohoufo.common.alarm.UfoInfluxdbVo;
8 import com.yohoufo.common.annotation.IgnoreSession; 11 import com.yohoufo.common.annotation.IgnoreSession;
9 import com.yohoufo.common.annotation.IgnoreSignature; 12 import com.yohoufo.common.annotation.IgnoreSignature;
  13 +import com.yohoufo.common.constant.InfluxdbFieldEnum;
  14 +import com.yohoufo.common.constant.InfluxdbMeasurementEnum;
10 import com.yohoufo.common.exception.GatewayException; 15 import com.yohoufo.common.exception.GatewayException;
11 import com.yohoufo.dal.order.model.SellerOrder; 16 import com.yohoufo.dal.order.model.SellerOrder;
12 import com.yohoufo.order.model.request.OrderListRequest; 17 import com.yohoufo.order.model.request.OrderListRequest;
@@ -91,6 +96,9 @@ public class SellerOrderController { @@ -91,6 +96,9 @@ public class SellerOrderController {
91 @RequestParam(name="address_id")String address_id, 96 @RequestParam(name="address_id")String address_id,
92 @RequestParam(name="num", defaultValue = "1", required = false)int num, 97 @RequestParam(name="num", defaultValue = "1", required = false)int num,
93 @RequestParam(name="skupType", defaultValue = DEFAULT_SKUP_TYPE, required = false) Integer skupType) throws GatewayException { 98 @RequestParam(name="skupType", defaultValue = DEFAULT_SKUP_TYPE, required = false) Integer skupType) throws GatewayException {
  99 + EventBusPublisher.publishEvent(new UfoInfluxdbEvent(new UfoInfluxdbVo.Builder().setMeasurement(InfluxdbMeasurementEnum.MEASUREMENT_ORDER_CANCEL)
  100 + .addInitField(InfluxdbFieldEnum.FIELD_COUNT).build())); // 统计取消订单的次数
  101 +
94 SellerOrderSubmitReq req = SellerOrderSubmitReq.builder() 102 SellerOrderSubmitReq req = SellerOrderSubmitReq.builder()
95 .uid(uid) 103 .uid(uid)
96 .storageId(storage_id) 104 .storageId(storage_id)