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