|
|
@@ -2,6 +2,7 @@ package com.java110.api.listener.advert;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.java110.api.bmo.advert.IAdvertBMO;
|
|
|
import com.java110.api.listener.AbstractServiceApiListener;
|
|
|
import com.java110.core.annotation.Java110Listener;
|
|
|
import com.java110.core.context.DataFlowContext;
|
|
|
@@ -11,6 +12,7 @@ import com.java110.utils.constant.BusinessTypeConstant;
|
|
|
import com.java110.utils.constant.CommonConstant;
|
|
|
import com.java110.utils.constant.ServiceCodeAdvertConstant;
|
|
|
import com.java110.utils.util.Assert;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
import org.springframework.http.HttpMethod;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
|
@@ -21,6 +23,9 @@ import org.springframework.http.ResponseEntity;
|
|
|
*/
|
|
|
@Java110Listener("deleteAdvertListener")
|
|
|
public class DeleteAdvertListener extends AbstractServiceApiListener {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IAdvertBMO advertBMOImpl;
|
|
|
@Override
|
|
|
protected void validate(ServiceDataFlowEvent event, JSONObject reqJson) {
|
|
|
//Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
|
|
|
@@ -39,14 +44,9 @@ public class DeleteAdvertListener extends AbstractServiceApiListener {
|
|
|
AppService service = event.getAppService();
|
|
|
|
|
|
//添加单元信息
|
|
|
- businesses.add(deleteAdvert(reqJson, context));
|
|
|
-
|
|
|
- JSONObject paramInObj = super.restToCenterProtocol(businesses, context.getRequestCurrentHeaders());
|
|
|
-
|
|
|
- //将 rest header 信息传递到下层服务中去
|
|
|
- super.freshHttpHeader(header, context.getRequestCurrentHeaders());
|
|
|
+ businesses.add(advertBMOImpl.deleteAdvert(reqJson, context));
|
|
|
|
|
|
- ResponseEntity<String> responseEntity = this.callService(context, service.getServiceCode(), paramInObj);
|
|
|
+ ResponseEntity<String> responseEntity = advertBMOImpl.callService(context, service.getServiceCode(), businesses);
|
|
|
|
|
|
context.setResponseEntity(responseEntity);
|
|
|
}
|
|
|
@@ -67,25 +67,6 @@ public class DeleteAdvertListener extends AbstractServiceApiListener {
|
|
|
}
|
|
|
|
|
|
|
|
|
- /**
|
|
|
- * 添加小区信息
|
|
|
- *
|
|
|
- * @param paramInJson 接口调用放传入入参
|
|
|
- * @param dataFlowContext 数据上下文
|
|
|
- * @return 订单服务能够接受的报文
|
|
|
- */
|
|
|
- private JSONObject deleteAdvert(JSONObject paramInJson, DataFlowContext dataFlowContext) {
|
|
|
-
|
|
|
-
|
|
|
- JSONObject business = JSONObject.parseObject("{\"datas\":{}}");
|
|
|
- business.put(CommonConstant.HTTP_BUSINESS_TYPE_CD, BusinessTypeConstant.BUSINESS_TYPE_DELETE_ADVERT);
|
|
|
- business.put(CommonConstant.HTTP_SEQ, DEFAULT_SEQ);
|
|
|
- business.put(CommonConstant.HTTP_INVOKE_MODEL, CommonConstant.HTTP_INVOKE_MODEL_S);
|
|
|
- JSONObject businessAdvert = new JSONObject();
|
|
|
- businessAdvert.putAll(paramInJson);
|
|
|
- //计算 应收金额
|
|
|
- business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessAdvert", businessAdvert);
|
|
|
- return business;
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
}
|