-
Notifications
You must be signed in to change notification settings - Fork 2.5k
/
rapActionSample.js
302 lines (301 loc) · 10.6 KB
/
rapActionSample.js
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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
/**
* RAP接口规范DEMO
*/
{
"id": 627, // 请求ID
"name": "报表数据", // 请求名称
"description": "获取报表数据", // 请求描述
"requestType": "1", // 请求类型(GET/POST)
"requestUrl": "/snsADGroup/listSNSADGroup.htm", // 请求链接
"responseTemplate": "",
/**
* 请求参数列表
*/
"requestParameterList": [{
"id": 11819, // 参数ID
"identifier": "queryVO", // 参数标识符
"name": "请求对象", // 参数名称
"remark": "@mock=@EMAIL", // 备注、RAP MOCK、MockJS标签
"validator": "", // 验证器
"dataType": "object", // 数据类型
"parameterList": [{ // 子参数列表
"id": 11825,
"identifier": "campaignType",
"name": "计划类型",
"remark": "固定为20;@value=20",
"parameterList": [],
"validator": "",
"dataType": "number"
}, {
"id": 11824,
"identifier": "queryState",
"name": "状态过滤",
"remark": "0-全部,1-推广中,2-暂停,3-拒绝,4-待处理,5-已过期,6-审核中",
"parameterList": [],
"validator": "",
"dataType": "number"
}, {
"id": 11822,
"identifier": "pageNumber",
"name": "页码",
"remark": "",
"parameterList": [],
"validator": "",
"dataType": "number"
}, {
"id": 12051,
"identifier": "endDate",
"name": "结束日期",
"remark": "",
"parameterList": [],
"validator": "",
"dataType": "number"
}, {
"id": 11823,
"identifier": "pageSize",
"name": "每页条目数",
"remark": "@value=20",
"parameterList": [],
"validator": "",
"dataType": "number"
}, {
"id": 11820,
"identifier": "query",
"name": "搜索关键词",
"remark": "",
"parameterList": [],
"validator": "",
"dataType": "string"
}, {
"id": 11821,
"identifier": "startDate",
"name": "开始日期",
"remark": "",
"parameterList": [],
"validator": "",
"dataType": "number"
}]
}],
/**
* 响应参数列表
*
* 结构与请求参数列表相同
*/
"responseParameterList": [{
"id": 11635,
"identifier": "result",
"name": "",
"remark": "",
"parameterList": [{
"id": 11832,
"identifier": "totalItem",
"name": "",
"remark": "@value=12",
"parameterList": [],
"validator": "",
"dataType": "string"
}, {
"id": 11864,
"identifier": "pageSize",
"name": "每页条目数",
"remark": "@value=20",
"parameterList": [],
"validator": "",
"dataType": "number"
}, {
"id": 11834,
"identifier": "items",
"name": "",
"remark": "@length=20",
"parameterList": [{
"id": 11865,
"identifier": "snsADGroupDTO",
"name": "推广组",
"remark": "",
"parameterList": [{
"id": 11870,
"identifier": "startTime",
"name": "投放开始日期",
"remark": "@value=2013-11-01",
"parameterList": [],
"validator": "",
"dataType": "string"
}, {
"id": 12246,
"identifier": "onlineStatus",
"name": "状态",
"remark": "0-暂停;1-推广中;@regex=[01]",
"parameterList": [],
"validator": "",
"dataType": "number"
}, {
"id": 11869,
"identifier": "title",
"name": "推广单元名称",
"remark": "@regex=单元[0-9a-z]{4}",
"parameterList": [],
"validator": "",
"dataType": "string"
}, {
"id": 11868,
"identifier": "endTime",
"name": "投放结束日期",
"remark": "@value=2013-11-11",
"parameterList": [],
"validator": "",
"dataType": "string"
}, {
"id": 11867,
"identifier": "id",
"name": "推广组ID",
"remark": "@format=xxxxxx",
"parameterList": [],
"validator": "",
"dataType": "number"
}],
"validator": "",
"dataType": "object"
}, {
"id": 12245,
"identifier": "status",
"name": "状态",
"remark": "0-全部,1-推广中,2-暂停,3-拒绝,4-待处理,5-已过期,6-审核中;@regex=[0-6]",
"parameterList": [],
"validator": "",
"dataType": "number"
}, {
"id": 11871,
"identifier": "snsCreativeDTO",
"name": "创意",
"remark": "",
"parameterList": [{
"id": 11872,
"identifier": "title",
"name": "创意内容",
"remark": "@value=创意内容test [宝贝链接1][宝贝链接2][宝贝链接3]",
"parameterList": [],
"validator": "",
"dataType": "string"
}, {
"id": 11879,
"identifier": "adgroupId",
"name": "推广组ID",
"remark": "前端暂时用不上",
"parameterList": [],
"validator": "",
"dataType": "number"
}, {
"id": 11873,
"identifier": "areaList",
"name": "宝贝列表",
"remark": "@length=3",
"parameterList": [{
"id": 11878,
"identifier": "bidPrice",
"name": "宝贝出价",
"remark": "分;@format=xxx",
"parameterList": [],
"validator": "",
"dataType": "number"
}, {
"id": 11876,
"identifier": "title",
"name": "宝贝名称",
"remark": "@regex=宝贝名称[0-9a-z]{4}",
"parameterList": [],
"validator": "",
"dataType": "string"
}, {
"id": 11963,
"identifier": "itemId",
"name": "宝贝ID",
"remark": "调用报表时的entityId;@value=1200[xx]",
"parameterList": [],
"validator": "",
"dataType": "number"
}, {
"id": 11874,
"identifier": "imgUrl",
"name": "宝贝URL",
"remark": "@value=http://g.search3.alicdn.com/img/bao/uploaded/i4/i4/15103030501261469/T1KksSFddaXXXXXXXX_!!0-item_pic.jpg",
"parameterList": [],
"validator": "",
"dataType": "string"
}, {
"id": 12249,
"identifier": "linkUrl",
"name": "宝贝链接",
"remark": "@value=http://item.taobao.com/item.htm?id=25604888180",
"parameterList": [],
"validator": "",
"dataType": "string"
}, {
"id": 11877,
"identifier": "itemPrice",
"name": "宝贝价格",
"remark": "分;@format=xxx",
"parameterList": [],
"validator": "",
"dataType": "number"
}, {
"id": 11875,
"identifier": "feedId",
"name": "物料ID",
"remark": "@value=1000[xx]",
"parameterList": [],
"validator": "",
"dataType": "number"
}],
"validator": "",
"dataType": "array<object>"
}, {
"id": 11880,
"identifier": "id",
"name": "创意ID",
"remark": "@value=1001",
"parameterList": [],
"validator": "",
"dataType": "number"
}],
"validator": "",
"dataType": "object"
}],
"validator": "",
"dataType": "array<object>"
}, {
"id": 11833,
"identifier": "toPage",
"name": "",
"remark": "@value=1",
"parameterList": [],
"validator": "",
"dataType": "string"
}],
"validator": "",
"dataType": "object"
}, {
"id": 11649,
"identifier": "msg",
"name": "",
"remark": "",
"parameterList": [],
"validator": "",
"dataType": ""
}, {
"id": 11650,
"identifier": "hostName",
"name": "",
"remark": "@value=newbpfepre1.vm.kgb.cm6",
"parameterList": [],
"validator": "",
"dataType": "string"
}, {
"id": 11648,
"identifier": "code",
"name": "",
"remark": "@value=200",
"parameterList": [],
"validator": "",
"dataType": "number"
}]
}