Merge branch 'master' into develop
Showing
1 changed file
with
399 additions
and
0 deletions
inferface-document/search_words.md
0 → 100644
1 | +# 搜索词管理 | ||
2 | +--------------------- | ||
3 | + | ||
4 | +## 新增默认搜索词 | ||
5 | + | ||
6 | +> 接口名:`searchWords/addSearchWords` | ||
7 | + | ||
8 | +### 入参 | ||
9 | + | ||
10 | +------------------------- | ||
11 | +|属性名称|类型|例子|说明| | ||
12 | +|--------|----|----|----| | ||
13 | +|type|int|1|搜索词类型:1默认搜索词 | | ||
14 | +|content|String|内容实得分|内容| | ||
15 | +|channelIds|String|1,2,3|频道类型 多个用逗号隔开 默认搜索词专用| | ||
16 | +|url|String|https://pandao.github.io/editor.md/examples/simple.html|链接| | ||
17 | +|startTime|int|1449504000|开始时间,时间的秒数| | ||
18 | +|endTime|int|1449504000|结束时间,时间的秒数| | ||
19 | +|creatorUid|int|2323|添加人id| | ||
20 | +|creatorUsrname|String|zhangsan|添加人名称| | ||
21 | +--------------------- | ||
22 | + | ||
23 | +### 返回 | ||
24 | + | ||
25 | +``` json | ||
26 | +请求样例: | ||
27 | +{ | ||
28 | + "channelIds": "2,3", | ||
29 | + "content": "2342", | ||
30 | + "creatorUid": 3, | ||
31 | + "creatorUsrname": "zhangsan", | ||
32 | + "endTime": 1449504000, | ||
33 | + "modifyUid": 3, | ||
34 | + "modifyUsrname": "zhangsan", | ||
35 | + "startTime": 1449504000, | ||
36 | + "type": 1, | ||
37 | + "url": "https://pandao.github.io/editor.md/examples/simple.html" | ||
38 | +} | ||
39 | +正常返回: | ||
40 | +{ | ||
41 | + "code": 200, | ||
42 | + "data": [], | ||
43 | + "md5": "d751713988987e9331980363e24189ce", | ||
44 | + "message": "添加成功" | ||
45 | +} | ||
46 | +异常返回: | ||
47 | +{ | ||
48 | + "code": 405, | ||
49 | + "data": [], | ||
50 | + "md5": "d751713988987e9331980363e24189ce", | ||
51 | + "message": "频道不能为空" | ||
52 | +} | ||
53 | + | ||
54 | +``` | ||
55 | +## 修改默认搜索词 | ||
56 | + | ||
57 | +> 接口名:`searchWords/updateSearchWords` | ||
58 | + | ||
59 | +### 入参 | ||
60 | + | ||
61 | +------------------------- | ||
62 | +|属性名称|类型|例子|说明| | ||
63 | +|--------|----|----|----| | ||
64 | +|id|int|1|主键 | | ||
65 | +|type|int|1|搜索词类型:1默认搜索词 | | ||
66 | +|channelIds|String|1,2,3|频道类型 多个用逗号隔开 默认搜索词专用| | ||
67 | +|url|String|https://pandao.github.io/editor.md/examples/simple.html|链接| | ||
68 | +|startTime|int|1449504000|开始时间,时间的秒数| | ||
69 | +|endTime|int|1449504000|结束时间,时间的秒数| | ||
70 | +|status|int|1|状态 2 开启 1 禁用| | ||
71 | +|modifyUid|int|2323|修改人id| | ||
72 | +|modifyUsrname|String|zhangsan|修改人名称| | ||
73 | +--------------------- | ||
74 | + | ||
75 | +### 样例 | ||
76 | + | ||
77 | +``` json | ||
78 | +请求样例: | ||
79 | +{ | ||
80 | + "channelIds": "2,3", | ||
81 | + "content": "2342", | ||
82 | + "creatorUid": 3, | ||
83 | + "creatorUsrname": "zhangsan", | ||
84 | + "endTime": 1449504000, | ||
85 | + "modifyUid": 3, | ||
86 | + "modifyUsrname": "zhangsan", | ||
87 | + "startTime": 1449504000, | ||
88 | + "type": 1, | ||
89 | + "status": 1, | ||
90 | + "id": 111, | ||
91 | + "url": "https://pandao.github.io/editor.md/examples/simple.html" | ||
92 | +} | ||
93 | +正常返回: | ||
94 | +{ | ||
95 | + "code": 200, | ||
96 | + "data": [], | ||
97 | + "md5": "d751713988987e9331980363e24189ce", | ||
98 | + "message": "修改成功" | ||
99 | +} | ||
100 | +异常返回: | ||
101 | +{ | ||
102 | + "code": 405, | ||
103 | + "data": [], | ||
104 | + "md5": "d751713988987e9331980363e24189ce", | ||
105 | + "message": "内容不能为空" | ||
106 | +} | ||
107 | + | ||
108 | +``` | ||
109 | + | ||
110 | + | ||
111 | +## 查询默认搜索词 | ||
112 | +> 接口名: `/searchWords/querySearchWords` | ||
113 | + | ||
114 | +### 入参 | ||
115 | + | ||
116 | +------------------------- | ||
117 | +|属性名称|类型|例子|说明| | ||
118 | +|--------|----|----|----| | ||
119 | +|page|int|2|第几页| | ||
120 | +|size|int|50|每页条数| | ||
121 | +|type|int|1|搜索词类型:1默认搜索词 | | ||
122 | +|channelIds|String|3|频道类型| | ||
123 | +|startTime|int|1449504000|开始时间,时间的秒数| | ||
124 | +|endTime|int|1449504000|结束时间,时间的秒数| | ||
125 | +|status|int|1|状态 2 开启 1 禁用| | ||
126 | +--------------------------- | ||
127 | + | ||
128 | +### 返回 | ||
129 | + | ||
130 | +```json | ||
131 | +请求 | ||
132 | +{ | ||
133 | +"page":0, | ||
134 | +"size":3, | ||
135 | +"content":"哈哈", | ||
136 | +"type":2, | ||
137 | +"channelIds":1 | ||
138 | +} | ||
139 | +返回: | ||
140 | +{ | ||
141 | + "code": 200, | ||
142 | + "data": { | ||
143 | + "list": [ | ||
144 | + { | ||
145 | + "channelIds": "", | ||
146 | + "content": "呵呵哈哈", | ||
147 | + "createdTime": 1451290193, | ||
148 | + "creatorUid": 2799, | ||
149 | + "creatorUsrname": "gaoshang", | ||
150 | + "endTime": 0, | ||
151 | + "goodsNum": 0, | ||
152 | + "id": 99, | ||
153 | + "modifyTime": 0, | ||
154 | + "modifyUid": 0, | ||
155 | + "sort": 7, | ||
156 | + "startTime": 0, | ||
157 | + "status": 2, | ||
158 | + "type": 3, | ||
159 | + "url": "" | ||
160 | + }, | ||
161 | + { | ||
162 | + "channelIds": "", | ||
163 | + "content": "哈哈哈", | ||
164 | + "createdTime": 1451290166, | ||
165 | + "creatorUid": 2799, | ||
166 | + "creatorUsrname": "gaoshang", | ||
167 | + "endTime": 0, | ||
168 | + "goodsNum": 4, | ||
169 | + "id": 97, | ||
170 | + "modifyTime": 1451326921, | ||
171 | + "modifyUid": 100019, | ||
172 | + "modifyUsrname": "zhipeng.wei", | ||
173 | + "sort": 4, | ||
174 | + "startTime": 0, | ||
175 | + "status": 2, | ||
176 | + "type": 2, | ||
177 | + "url": "" | ||
178 | + }, | ||
179 | + { | ||
180 | + "channelIds": "", | ||
181 | + "content": "呵呵哈哈", | ||
182 | + "createdTime": 1451290085, | ||
183 | + "creatorUid": 2799, | ||
184 | + "creatorUsrname": "gaoshang", | ||
185 | + "endTime": 1451577600, | ||
186 | + "goodsNum": 0, | ||
187 | + "id": 96, | ||
188 | + "modifyTime": 0, | ||
189 | + "modifyUid": 0, | ||
190 | + "sort": 0, | ||
191 | + "startTime": 1451232000, | ||
192 | + "status": 2, | ||
193 | + "type": 1, | ||
194 | + "url": "" | ||
195 | + } | ||
196 | + ], | ||
197 | + "page": 1, | ||
198 | + "size": 3, | ||
199 | + "total": 3, | ||
200 | + "totalPage": 1 | ||
201 | + }, | ||
202 | + "md5": "01acb7689ad5d33bb49613d9d3a4cbb1", | ||
203 | + "message": "查询搜索词列表" | ||
204 | +} | ||
205 | +``` | ||
206 | +-------- | ||
207 | + | ||
208 | +## 新增下拉词 | ||
209 | + | ||
210 | +> 接口名:`searchWords/addSearchWords` | ||
211 | + | ||
212 | +### 入参 | ||
213 | + | ||
214 | +------------------------- | ||
215 | +|属性名称|类型|例子|说明| | ||
216 | +|--------|----|----|----| | ||
217 | +|type|int|2|搜索词类型:2默认搜索词 | | ||
218 | +|content|String|内容实得分|内容| | ||
219 | +|goodsNum|int|4|商品数| | ||
220 | +|sort|int|12|排序| | ||
221 | +|creatorUid|int|2323|添加人id| | ||
222 | +|creatorUsrname|String|zhangsan|添加人名称| | ||
223 | +--------------------- | ||
224 | + | ||
225 | +### 返回 | ||
226 | + | ||
227 | +``` json | ||
228 | +请求样例: | ||
229 | +{ | ||
230 | + "content": "2342", | ||
231 | + "creatorUid": 3, | ||
232 | + "creatorUsrname": "zhangsan", | ||
233 | + "goodsNum": 1, | ||
234 | + "sort": "32" | ||
235 | +} | ||
236 | +正常返回: | ||
237 | +{ | ||
238 | + "code": 200, | ||
239 | + "data": [], | ||
240 | + "md5": "d751713988987e9331980363e24189ce", | ||
241 | + "message": "添加成功" | ||
242 | +} | ||
243 | +异常返回: | ||
244 | +{ | ||
245 | + "code": 405, | ||
246 | + "data": [], | ||
247 | + "md5": "d751713988987e9331980363e24189ce", | ||
248 | + "message": "频道不能为空" | ||
249 | +} | ||
250 | + | ||
251 | +``` | ||
252 | +## 修改下拉词 | ||
253 | + | ||
254 | +> 接口名:`searchWords/updateSearchWords` | ||
255 | + | ||
256 | +### 入参 | ||
257 | + | ||
258 | +------------------------- | ||
259 | +|属性名称|类型|例子|说明| | ||
260 | +|--------|----|----|----| | ||
261 | +|id|int|1|主键 | | ||
262 | +|type|int|2|搜索词类型:2 下拉词 | | ||
263 | +|goodsNum|int|4|商品数| | ||
264 | +|sort|int|12|排序| | ||
265 | +|status|int|1|状态 2 开启 1 禁用| | ||
266 | +|modifyUid|int|2323|修改人id| | ||
267 | +|modifyUsrname|String|zhangsan|修改人名称| | ||
268 | +--------------------- | ||
269 | + | ||
270 | +### 样例 | ||
271 | + | ||
272 | +``` json | ||
273 | +请求样例: | ||
274 | +{ | ||
275 | + "content": "2342", | ||
276 | + "endTime": 1449504000, | ||
277 | + "modifyUid": 3, | ||
278 | + "modifyUsrname": "zhangsan", | ||
279 | + "type":2, | ||
280 | + "status": 1, | ||
281 | + "id": 111, | ||
282 | + "goodsNum": 3, | ||
283 | + "sort": 3 | ||
284 | +} | ||
285 | +正常返回: | ||
286 | +{ | ||
287 | + "code": 200, | ||
288 | + "data": [], | ||
289 | + "md5": "d751713988987e9331980363e24189ce", | ||
290 | + "message": "修改成功" | ||
291 | +} | ||
292 | +异常返回: | ||
293 | +{ | ||
294 | + "code": 405, | ||
295 | + "data": [], | ||
296 | + "md5": "d751713988987e9331980363e24189ce", | ||
297 | + "message": "内容不能为空" | ||
298 | +} | ||
299 | + | ||
300 | +``` | ||
301 | + | ||
302 | + | ||
303 | +## 查询下拉词 | ||
304 | +> 接口名: `/searchWords/querySearchWords` | ||
305 | + | ||
306 | +### 入参 | ||
307 | + | ||
308 | +------------------------- | ||
309 | +|属性名称|类型|例子|说明| | ||
310 | +|--------|----|----|----| | ||
311 | +|page|int|2|第几页| | ||
312 | +|size|int|10|每页条数| | ||
313 | +|type|int|2|搜索词类型:2 下拉词 | | ||
314 | +|content|String|阿迪| 内容| | ||
315 | +|status|int|1|状态 2 开启 1 禁用| | ||
316 | +--------------------------- | ||
317 | + | ||
318 | +### 返回 | ||
319 | + | ||
320 | +```json | ||
321 | +请求 | ||
322 | +{ | ||
323 | +"page":0, | ||
324 | +"size":3, | ||
325 | +"content":"哈哈", | ||
326 | +"type":2, | ||
327 | +"status":1 | ||
328 | +} | ||
329 | +返回: | ||
330 | +{ | ||
331 | + "code": 200, | ||
332 | + "data": { | ||
333 | + "list": [ | ||
334 | + { | ||
335 | + "channelIds": "", | ||
336 | + "content": "呵呵哈哈", | ||
337 | + "createdTime": 1451290193, | ||
338 | + "creatorUid": 2799, | ||
339 | + "creatorUsrname": "gaoshang", | ||
340 | + "endTime": 0, | ||
341 | + "goodsNum": 0, | ||
342 | + "id": 99, | ||
343 | + "modifyTime": 0, | ||
344 | + "modifyUid": 0, | ||
345 | + "sort": 7, | ||
346 | + "startTime": 0, | ||
347 | + "status": 2, | ||
348 | + "type": 3, | ||
349 | + "url": "" | ||
350 | + }, | ||
351 | + { | ||
352 | + "channelIds": "", | ||
353 | + "content": "哈哈哈", | ||
354 | + "createdTime": 1451290166, | ||
355 | + "creatorUid": 2799, | ||
356 | + "creatorUsrname": "gaoshang", | ||
357 | + "endTime": 0, | ||
358 | + "goodsNum": 4, | ||
359 | + "id": 97, | ||
360 | + "modifyTime": 1451326921, | ||
361 | + "modifyUid": 100019, | ||
362 | + "modifyUsrname": "zhipeng.wei", | ||
363 | + "sort": 4, | ||
364 | + "startTime": 0, | ||
365 | + "status": 2, | ||
366 | + "type": 2, | ||
367 | + "url": "" | ||
368 | + }, | ||
369 | + { | ||
370 | + "channelIds": "", | ||
371 | + "content": "呵呵哈哈", | ||
372 | + "createdTime": 1451290085, | ||
373 | + "creatorUid": 2799, | ||
374 | + "creatorUsrname": "gaoshang", | ||
375 | + "endTime": 1451577600, | ||
376 | + "goodsNum": 0, | ||
377 | + "id": 96, | ||
378 | + "modifyTime": 0, | ||
379 | + "modifyUid": 0, | ||
380 | + "sort": 0, | ||
381 | + "startTime": 1451232000, | ||
382 | + "status": 2, | ||
383 | + "type": 1, | ||
384 | + "url": "" | ||
385 | + } | ||
386 | + ], | ||
387 | + "page": 1, | ||
388 | + "size": 3, | ||
389 | + "total": 3, | ||
390 | + "totalPage": 1 | ||
391 | + }, | ||
392 | + "md5": "01acb7689ad5d33bb49613d9d3a4cbb1", | ||
393 | + "message": "查询搜索词列表" | ||
394 | +} | ||
395 | +``` | ||
396 | + | ||
397 | + | ||
398 | + | ||
399 | + |
-
Please register or login to post a comment