Showing
1 changed file
with
181 additions
and
176 deletions
1 | -# 公告管理接口服务定义 | ||
2 | ----------------------- | ||
3 | - | ||
4 | -# 查询公告接口 | ||
5 | - | ||
6 | -> 接口名:`notice/getList` | ||
7 | - | ||
8 | -### 入参 | ||
9 | - | ||
10 | ----------------------------------- | ||
11 | -|属性名称|类型|例子|说明|是否必填| | ||
12 | -|--------|----|----|----|--------| | ||
13 | -|title|string|新人|标题,模糊查询|否| | ||
14 | -|position|integer|1|位置|否| | ||
15 | -|showChannel|integer|1|频道, 当位置为首页(2)时,可以选择 1.男首、2.女首、3.潮童、4.创意生活|否| | ||
16 | ----------------------------------- | ||
17 | - | ||
18 | -### 返回 | ||
19 | - | ||
20 | -``` json | ||
21 | -{ | ||
22 | - "code": 200, | ||
23 | - "data": { | ||
24 | - "list": [ | ||
25 | - { | ||
26 | - "createTime": 1451298094, | ||
27 | - "endTime": 1451577600, | ||
28 | - "id": 15, | ||
29 | - "img": "", | ||
30 | - "position": 2, | ||
31 | - "showChannels": "1,2,3", | ||
32 | - "startTime": 1451298061, | ||
33 | - "status": 1, | ||
34 | - "title": "新人专享", | ||
35 | - "url": "{\"action\":\"go.activitytemplate\",\"url\":\"http://m.yohobuy.com?template_id=3&title=新人专享&type=1\"}" | ||
36 | - } | ||
37 | - ], | ||
38 | - "page": 1, | ||
39 | - "size": 20, | ||
40 | - "total": 1, | ||
41 | - "totalPage": 1 | ||
42 | - }, | ||
43 | - "message": "Notice List" | ||
44 | -} | ||
45 | -``` | ||
46 | - | ||
47 | -# 添加公告接口 | ||
48 | - | ||
49 | -> 接口名:`notice/addNotice` | ||
50 | - | ||
51 | -### 入参 | ||
52 | - | ||
53 | ----------------------------------- | ||
54 | -|属性名称|类型|例子|说明|是否必填| | ||
55 | -|--------|----|----|----|--------| | ||
56 | -|title|string|新人|标题,模糊查询|是| | ||
57 | -|position|integer|1|位置|是| | ||
58 | -|showChannels|integer[]|[1,2]|首页频道|否| | ||
59 | -|url|string|http://test.com|链接|否| | ||
60 | -|img|string|http://test.jpg|图片链接|否| | ||
61 | -|startTime|integer|1450843526|开始时间|否| | ||
62 | -|endTime|integer|1451450631|结束时间,结束时间大于开始时间|否| | ||
63 | ----------------------------------- | ||
64 | - | ||
65 | -### 返回 | ||
66 | - | ||
67 | -``` json | ||
68 | -{ | ||
69 | - "code": 200, | ||
70 | - "message": "添加成功" | ||
71 | -} | ||
72 | -``` | ||
73 | - | ||
74 | -# 获取公告接口 | ||
75 | - | ||
76 | -> 接口名:`notice/getNotice` | ||
77 | - | ||
78 | -### 入参 | ||
79 | - | ||
80 | ----------------------------------- | ||
81 | -|属性名称|类型|例子|说明|是否必填| | ||
82 | -|--------|----|----|----|--------| | ||
83 | -|id|integer|22|主键|是| | ||
84 | ----------------------------------- | ||
85 | - | ||
86 | -### 返回 | ||
87 | - | ||
88 | -``` json | ||
89 | -{ | ||
90 | - "code": 200, | ||
91 | - "data": { | ||
92 | - "createTime": 1456299447, | ||
93 | - "endTime": 1450843526, | ||
94 | - "id": 22, | ||
95 | - "img": "http://img.cn.png", | ||
96 | - "position": 2, | ||
97 | - "showChannels": "1,2,3", | ||
98 | - "startTime": 1450843526, | ||
99 | - "status": 0, | ||
100 | - "title": "这是一个测试", | ||
101 | - "url": "http://url.cn" | ||
102 | - }, | ||
103 | - "message": "Notice Info" | ||
104 | -} | ||
105 | -``` | ||
106 | - | ||
107 | -# 更新公告接口 | ||
108 | - | ||
109 | -> 接口名:`notice/updateNotice` | ||
110 | - | ||
111 | -### 入参 | ||
112 | - | ||
113 | ----------------------------------- | ||
114 | -|属性名称|类型|例子|说明|是否必填| | ||
115 | -|--------|----|----|----|--------| | ||
116 | -|id|integer|22|主键|是| | ||
117 | -|title|string|新人|标题,模糊查询|是| | ||
118 | -|position|integer|1|位置|是| | ||
119 | -|showChannels|integer[]|[1,2]|首页频道|否| | ||
120 | -|url|string|http://test.com|链接|否| | ||
121 | -|img|string|http://test.jpg|图片链接|否| | ||
122 | -|startTime|integer|1450843526|开始时间|否| | ||
123 | -|endTime|integer|1451450631|结束时间,结束时间大于开始时间|否| | ||
124 | ----------------------------------- | ||
125 | - | ||
126 | -### 返回 | ||
127 | - | ||
128 | -``` json | ||
129 | -{ | ||
130 | - "code": 200, | ||
131 | - "message": "修改成功" | ||
132 | -} | ||
133 | -``` | ||
134 | - | ||
135 | -# 删除公告接口 | ||
136 | - | ||
137 | -> 接口名:`notice/delNotice` | ||
138 | - | ||
139 | -### 入参 | ||
140 | - | ||
141 | ----------------------------------- | ||
142 | -|属性名称|类型|例子|说明|是否必填| | ||
143 | -|--------|----|----|----|--------| | ||
144 | -|id|integer|21|主键|是| | ||
145 | ----------------------------------- | ||
146 | - | ||
147 | -### 返回 | ||
148 | - | ||
149 | -``` json | ||
150 | -{ | ||
151 | - "code": 200, | ||
152 | - "message": "删除成功" | ||
153 | -} | ||
154 | -``` | ||
155 | - | ||
156 | -# 设置公告状态 | ||
157 | - | ||
158 | -> 接口名:`notice/setStatus` | ||
159 | - | ||
160 | -### 入参 | ||
161 | - | ||
162 | ----------------------------------- | ||
163 | -|属性名称|类型|例子|说明|是否必填| | ||
164 | -|--------|----|----|----|--------| | ||
165 | -|id|integer|21|主键|是| | ||
166 | -|status|integer|1|状态:0 不启用 ,1 启用 |否| | ||
167 | ----------------------------------- | ||
168 | - | ||
169 | -### 返回 | ||
170 | - | ||
171 | -``` json | ||
172 | -{ | ||
173 | - "code": 200, | ||
174 | - "message": "修改成功" | ||
175 | -} | ||
176 | -``` | 1 | +# 公告管理接口服务定义 |
2 | +---------------------- | ||
3 | + | ||
4 | +# 查询公告接口 | ||
5 | + | ||
6 | +> 接口名:`notice/getList` | ||
7 | + | ||
8 | +### 入参 | ||
9 | +``` json | ||
10 | +{ | ||
11 | + "title": "新人", | ||
12 | + "position": 1, | ||
13 | + "showChannels": "1" | ||
14 | +} | ||
15 | +``` | ||
16 | + | ||
17 | +|属性名称|类型|例子|说明|是否必填| | ||
18 | +|--------|----|----|----|--------| | ||
19 | +|title|string|新人|标题,模糊查询|否| | ||
20 | +|position|integer|1|位置|否| | ||
21 | +|showChannels|string|1|频道, 当位置为首页(2)时,可以选择 1.男首、2.女首、3.潮童、4.创意生活|否| | ||
22 | + | ||
23 | +### 返回 | ||
24 | + | ||
25 | +``` json | ||
26 | +{ | ||
27 | + "code": 200, | ||
28 | + "data": { | ||
29 | + "list": [ | ||
30 | + { | ||
31 | + "createTime": 1451298094, | ||
32 | + "endTime": 1451577600, | ||
33 | + "id": 15, | ||
34 | + "img": "", | ||
35 | + "position": 2, | ||
36 | + "showChannels": "1,2,3", | ||
37 | + "startTime": 1451298061, | ||
38 | + "status": 1, | ||
39 | + "title": "新人专享", | ||
40 | + "url": "{\"action\":\"go.activitytemplate\",\"url\":\"http://m.yohobuy.com?template_id=3&title=新人专享&type=1\"}" | ||
41 | + } | ||
42 | + ], | ||
43 | + "page": 1, | ||
44 | + "size": 20, | ||
45 | + "total": 1, | ||
46 | + "totalPage": 1 | ||
47 | + }, | ||
48 | + "message": "Notice List" | ||
49 | +} | ||
50 | +``` | ||
51 | + | ||
52 | +# 添加公告接口 | ||
53 | + | ||
54 | +> 接口名:`notice/addNotice` | ||
55 | + | ||
56 | +### 入参 | ||
57 | + | ||
58 | +---------------------------------- | ||
59 | +|属性名称|类型|例子|说明|是否必填| | ||
60 | +|--------|----|----|----|--------| | ||
61 | +|title|string|新人|标题,模糊查询|是| | ||
62 | +|position|integer|1|位置|是| | ||
63 | +|showChannels|integer[]|[1,2]|首页频道|否| | ||
64 | +|url|string|http://test.com|链接|否| | ||
65 | +|img|string|http://test.jpg|图片链接|否| | ||
66 | +|startTime|integer|1450843526|开始时间|否| | ||
67 | +|endTime|integer|1451450631|结束时间,结束时间大于开始时间|否| | ||
68 | +---------------------------------- | ||
69 | + | ||
70 | +### 返回 | ||
71 | + | ||
72 | +``` json | ||
73 | +{ | ||
74 | + "code": 200, | ||
75 | + "message": "添加成功" | ||
76 | +} | ||
77 | +``` | ||
78 | + | ||
79 | +# 获取公告接口 | ||
80 | + | ||
81 | +> 接口名:`notice/getNotice` | ||
82 | + | ||
83 | +### 入参 | ||
84 | + | ||
85 | +---------------------------------- | ||
86 | +|属性名称|类型|例子|说明|是否必填| | ||
87 | +|--------|----|----|----|--------| | ||
88 | +|id|integer|22|主键|是| | ||
89 | +---------------------------------- | ||
90 | + | ||
91 | +### 返回 | ||
92 | + | ||
93 | +``` json | ||
94 | +{ | ||
95 | + "code": 200, | ||
96 | + "data": { | ||
97 | + "createTime": 1456299447, | ||
98 | + "endTime": 1450843526, | ||
99 | + "id": 22, | ||
100 | + "img": "http://img.cn.png", | ||
101 | + "position": 2, | ||
102 | + "showChannels": "1,2,3", | ||
103 | + "startTime": 1450843526, | ||
104 | + "status": 0, | ||
105 | + "title": "这是一个测试", | ||
106 | + "url": "http://url.cn" | ||
107 | + }, | ||
108 | + "message": "Notice Info" | ||
109 | +} | ||
110 | +``` | ||
111 | + | ||
112 | +# 更新公告接口 | ||
113 | + | ||
114 | +> 接口名:`notice/updateNotice` | ||
115 | + | ||
116 | +### 入参 | ||
117 | + | ||
118 | +---------------------------------- | ||
119 | +|属性名称|类型|例子|说明|是否必填| | ||
120 | +|--------|----|----|----|--------| | ||
121 | +|id|integer|22|主键|是| | ||
122 | +|title|string|新人|标题,模糊查询|是| | ||
123 | +|position|integer|1|位置|是| | ||
124 | +|showChannels|integer[]|[1,2]|首页频道|否| | ||
125 | +|url|string|http://test.com|链接|否| | ||
126 | +|img|string|http://test.jpg|图片链接|否| | ||
127 | +|startTime|integer|1450843526|开始时间|否| | ||
128 | +|endTime|integer|1451450631|结束时间,结束时间大于开始时间|否| | ||
129 | +---------------------------------- | ||
130 | + | ||
131 | +### 返回 | ||
132 | + | ||
133 | +``` json | ||
134 | +{ | ||
135 | + "code": 200, | ||
136 | + "message": "修改成功" | ||
137 | +} | ||
138 | +``` | ||
139 | + | ||
140 | +# 删除公告接口 | ||
141 | + | ||
142 | +> 接口名:`notice/delNotice` | ||
143 | + | ||
144 | +### 入参 | ||
145 | + | ||
146 | +---------------------------------- | ||
147 | +|属性名称|类型|例子|说明|是否必填| | ||
148 | +|--------|----|----|----|--------| | ||
149 | +|id|integer|21|主键|是| | ||
150 | +---------------------------------- | ||
151 | + | ||
152 | +### 返回 | ||
153 | + | ||
154 | +``` json | ||
155 | +{ | ||
156 | + "code": 200, | ||
157 | + "message": "删除成功" | ||
158 | +} | ||
159 | +``` | ||
160 | + | ||
161 | +# 设置公告状态 | ||
162 | + | ||
163 | +> 接口名:`notice/setStatus` | ||
164 | + | ||
165 | +### 入参 | ||
166 | + | ||
167 | +---------------------------------- | ||
168 | +|属性名称|类型|例子|说明|是否必填| | ||
169 | +|--------|----|----|----|--------| | ||
170 | +|id|integer|21|主键|是| | ||
171 | +|status|integer|1|状态:0 不启用 ,1 启用 |否| | ||
172 | +---------------------------------- | ||
173 | + | ||
174 | +### 返回 | ||
175 | + | ||
176 | +``` json | ||
177 | +{ | ||
178 | + "code": 200, | ||
179 | + "message": "修改成功" | ||
180 | +} | ||
181 | +``` |
-
Please register or login to post a comment