java110
2021-03-12 98116d9ee84dde981663bbbb6c6d133fcf842a95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package com.java110.api.bmo;
 
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.java110.core.context.DataFlowContext;
import com.java110.entity.center.AppService;
import com.java110.core.event.service.api.ServiceDataFlowEvent;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
 
import java.util.Map;
 
public interface IApiBaseBMO {
 
    /**
     * 调用下游服务
     *
     * @param event
     * @return
     */
    public ResponseEntity<String> callService(ServiceDataFlowEvent event);
    /**
     * 调用下游服务
     *
     * @param context
     * @param serviceCode 下游服务
     * @return
     */
     ResponseEntity<String> callService(DataFlowContext context, String serviceCode, JSONArray businesses);
 
    /**
     * 调用下游服务
     *
     * @param context
     * @param serviceCode 下游服务
     * @return
     */
    ResponseEntity<String> callService(DataFlowContext context, String serviceCode, JSONObject businesses);
 
    /**
     * 调用下游服务
     *
     * @param context
     * @param appService 下游服务
     * @return
     */
    ResponseEntity<String> callService(DataFlowContext context, AppService appService, Map paramIn);
 
    /**
     * 将rest 协议转为 订单协议
     *
     * @param businesses 多个业务
     * @param headers    订单头信息
     * @return
     */
    JSONObject restToCenterProtocol(JSONObject businesses, Map<String, String> headers);
    /**
     * 将rest 协议转为 订单协议
     *
     * @param businesses 多个业务
     * @param headers    订单头信息
     * @return
     */
     JSONObject restToCenterProtocol(JSONArray businesses, Map<String, String> headers);
 
    public void freshOrderProtocol(JSONObject orders, Map<String, String> headers);
 
    /**
     * 刷入order信息
     *
     * @param httpHeaders http 头信息
     * @param headers     头部信息
     */
    public void freshHttpHeader(HttpHeaders httpHeaders, Map<String, String> headers);
}