wuxw
2022-07-19 05683f2b2bdbdbe21cf17ad523c21ab338bd1c54
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
package com.java110.core.context;
 
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
 
import java.util.Map;
 
/**
 * 页面数据封装对象
 * <p>
 * add by wuxw 2019-03-19
 */
public interface IPageData {
 
    /**
     * 获取用户ID
     *
     * @return 用户ID
     */
    String getUserId();
 
    /**
     * 获取用户ID
     *
     * @return 用户ID
     */
    String getUserName();
 
    String getAppId();
 
    /**
     * 获取交易流水
     *
     * @return 交易流水
     */
    String getTransactionId();
 
    /**
     * 获取组件编码
     *
     * @return 组件编码
     */
    String getComponentCode();
 
    /**
     * 获取调用的组件方法
     *
     * @return 组件方法
     */
    String getComponentMethod();
 
    /**
     * 获取token
     *
     * @return token
     */
    String getToken();
 
    /**
     * 设置token
     *
     * @param token 登录成功时需要设置token
     */
    void setToken(String token);
 
    /**
     * 获取sessionID
     *
     * @return sessionID
     */
    String getSessionId();
 
    /**
     * 获取前台请求的数据
     *
     * @return 前台请求的数据
     */
    String getReqData();
 
    /**
     * 获取返回时间
     *
     * @return 返回时间
     */
    String getResponseTime();
 
    /**
     * 获取请求时间
     *
     * @return 请求时间
     */
    String getRequestTime();
 
 
    /**
     * 获取 ResponseEntity
     *
     * @return ResponseEntity
     */
    ResponseEntity getResponseEntity();
 
 
    /**
     * 设置 ResponseEntity
     *
     * @param responseEntity 返回界面时的对象
     */
    void setResponseEntity(ResponseEntity responseEntity);
 
    /**
     * 获取调用api 地址
     *
     * @return
     */
    public String getApiUrl();
 
    //设置调用api 服务地址
    public void setApiUrl(String apiUrl);
 
    public HttpMethod getMethod();
 
    Map<String, Object> getHeaders();
 
    public void setMethod(HttpMethod method);
 
    public String getPayerObjId();
 
    public void setPayerObjId(String payerObjId);
 
    public String getPayerObjType();
 
    public void setPayerObjType(String payerObjType);
 
    public String getEndTime();
 
    public void setEndTime(String endTime);
 
    /**
     * 构建 pd 对象
     *
     * @param userId          用户ID
     * @param token           token
     * @param reqData         请求数据
     * @param componentCode   组件编码
     * @param componentMethod 组件方法
     * @param url             请求url
     * @param sessionId       会话ID
     * @return IPageData对象
     * @throws IllegalArgumentException 参数错误异常
     */
    IPageData builder(String userId,
                      String userName,
                      String token,
                      String reqData,
                      String componentCode,
                      String componentMethod,
                      String url,
                      String sessionId,
                      String appId)
            throws IllegalArgumentException;
 
    /**
     * 构建 pd 对象
     *
     * @param userId          用户ID
     * @param token           token
     * @param reqData         请求数据
     * @param componentCode   组件编码
     * @param componentMethod 组件方法
     * @param url             请求url
     * @param sessionId       会话ID
     * @return IPageData对象
     * @throws IllegalArgumentException 参数错误异常
     */
    IPageData builder(String userId,
                      String userName,
                      String token,
                      String reqData,
                      String componentCode,
                      String componentMethod,
                      String url,
                      String sessionId,
                      String appId,
                      Map<String, Object> headers)
            throws IllegalArgumentException;
 
    IPageData builder(String userId,
                      String userName,
                      String token,
                      String reqData,
                      String componentCode,
                      String componentMethod,
                      String url,
                      String sessionId)
            throws IllegalArgumentException;
 
    IPageData builder(String userId,
                      String userName,
                      String token,
                      String reqData,
                      String componentCode,
                      String componentMethod,
                      String url,
                      String sessionId,
                      String appId,
                      String payerObjId,
                      String payerObjType,
                      String endTime)
            throws IllegalArgumentException;
 
}