|
|
资讯管理接口服务定义
|
|
|
---------------------
|
|
|
|
|
|
|
|
|
|
|
|
## 资讯列表查询
|
|
|
|
|
|
> 接口名: 'article/getList'
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|articleTitle|String|尖货盘点|资讯标题|
|
|
|
|articleGender|String|1|性别|
|
|
|
|authorId|int|2890|作者ID|
|
|
|
|maxSortId|int|12|分类ID|
|
|
|
|status|int|1|资讯状态|
|
|
|
|orderBy|String|1|时间方式|
|
|
|
|startTime|String|2016-01-01|开始时间|
|
|
|
|endTime|String|2016-02-01|结束时间|
|
|
|
---------------------
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code":200,
|
|
|
"message":"操作成功",
|
|
|
"data": {
|
|
|
"list": [
|
|
|
{
|
|
|
"id": "",
|
|
|
“coverImage": "", //封面图
|
|
|
"articleTitle": "", //资讯标题
|
|
|
"maxSortId": "", //分类
|
|
|
"articleGender": "", //性别
|
|
|
"authorId": "", //作者
|
|
|
"status": "", //状态,-1已关闭,0 未发布,1 已发布
|
|
|
"createTime": "", //创建时间
|
|
|
"publishTime": "", //发布时间
|
|
|
},
|
|
|
"page": 0,
|
|
|
"size": 50,
|
|
|
"total": 1000
|
|
|
"totalPage":20
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
## 获取作者列表接口
|
|
|
|
|
|
> 接口名: 'article/getAuthorList'
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|idName|String|1054|作者ID或姓名|
|
|
|
---------------------
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code":200,
|
|
|
"message":"操作成功",
|
|
|
"data": [
|
|
|
{
|
|
|
"id": "",
|
|
|
"name":""
|
|
|
}
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
## 获取所有分类接口
|
|
|
|
|
|
> 接口名: 'article/getSortList'
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
无
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code":200,
|
|
|
"message":"操作成功",
|
|
|
"data": [
|
|
|
{
|
|
|
"id": "",
|
|
|
"name":""
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
## 编辑时资讯详情接口
|
|
|
|
|
|
> 接口名: 'article/getArticleDetail'
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|id|int|43|资讯id|
|
|
|
---------------------
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code":200,
|
|
|
"message":"操作成功",
|
|
|
"data": {
|
|
|
"id": "",
|
|
|
“coverImage": "", //封面图
|
|
|
"articleTitle": "", //资讯标题
|
|
|
"maxSortId": "", //一级分类
|
|
|
"minSortId": "", //二级分类
|
|
|
"articleSummary": "",//摘要
|
|
|
"coverImageType": "",//图片类型
|
|
|
"articleType": "", //文章类型
|
|
|
"adsImgSize": "", //广告尺寸
|
|
|
"url": "", //链接
|
|
|
"articleGender": "", //性别
|
|
|
"authorId": "", //作者
|
|
|
"status": "", //状态,-1已关闭,0 未发布,1 已发布
|
|
|
"createTime": "", //创建时间
|
|
|
"publishTime": "", //发布时间
|
|
|
}
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
## 新增资讯接口
|
|
|
|
|
|
> 接口名: 'article/addArticle'
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|articleTitle|String|尖货盘点|资讯标题|
|
|
|
|articleGender|String|0|性别|
|
|
|
|authorId|int|3098|作者ID|
|
|
|
|maxSortId|int|12|一级分类ID|
|
|
|
|minSortId|int|35|二级分类ID|
|
|
|
|articleSummary|String|御寒首选|摘要|
|
|
|
|coverImage|String||封面图|
|
|
|
|coverImageType|int|1|图片类型|
|
|
|
|articleType|int|1|文章类型|
|
|
|
|adsImgSize|String|10881088|广告尺寸|
|
|
|
|url|String|{"action":"go.activity","url":"http://feature.yohobuy.com/0/0/373/index.html"|链接|
|
|
|
---------------------
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code":200,
|
|
|
"message":"添加成功!"
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
## 修改/发布(关闭)/推荐(取消推荐)资讯接口
|
|
|
|
|
|
> 接口名: 'article/addArticle'
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|id|int|1054|资讯ID|
|
|
|
|articleTitle|String|尖货盘点|资讯标题|
|
|
|
|articleGender|String|0|性别|
|
|
|
|authorId|int|3098|作者ID|
|
|
|
|maxSortId|int|12|一级分类ID|
|
|
|
|minSortId|int|35|二级分类ID|
|
|
|
|articleSummary|String|御寒首选|摘要|
|
|
|
|coverImage|String||封面图|
|
|
|
|coverImageType|int|1|图片类型|
|
|
|
|articleType|int|1|文章类型|
|
|
|
|adsImgSize|String|10881088|广告尺寸|
|
|
|
|url|String|{"action":"go.activity","url":"http://feature.yohobuy.com/0/0/373/index.html"|链接|
|
|
|
---------------------
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code":200,
|
|
|
"message":"修改成功!"
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
## 删除资讯接口
|
|
|
|
|
|
> 接口名: 'article/delArticle'
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|id|int|43|资讯id|
|
|
|
---------------------
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code":200,
|
|
|
"message":"删除成功!"
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
## 定时发布资讯接口
|
|
|
|
|
|
> 接口名: 'article/timePublish'
|
|
|
|
|
|
### 入参
|
|
|
|
|
|
-------------------------
|
|
|
|属性名称|类型|例子|说明|
|
|
|
|--------|----|----|----|
|
|
|
|id|int|43|资讯id|
|
|
|
|publishTime|int|1432188073|定时发布时间|
|
|
|
---------------------
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code":200,
|
|
|
"message":"定时发布成功!"
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
## 资讯获取选择选项的枚举接口
|
|
|
|
|
|
> 接口名: 'EnumListRest/getEnumList'
|
|
|
|
|
|
### 返回
|
|
|
|
|
|
``` json
|
|
|
{
|
|
|
"code":200,
|
|
|
"message":"请求成功",
|
|
|
"data": {
|
|
|
"genderItems": [{ //性别
|
|
|
"id": "",
|
|
|
"name": ""
|
|
|
}],
|
|
|
"publishStatusItems": [{ //发布状态
|
|
|
"id": "",
|
|
|
"name": ""
|
|
|
}],
|
|
|
"articleTypeItems": [{ //文章类型
|
|
|
"id": "",
|
|
|
"name": ""
|
|
|
}],
|
|
|
"coverImageTypeItems": [{ //封面图片类型
|
|
|
"id": "",
|
|
|
"name": ""
|
|
|
}],
|
|
|
"adsImgSizeItems": [{ //广告尺寸
|
|
|
"id": "",
|
|
|
"name": ""
|
|
|
}]
|
|
|
}
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
``` |
|
|
\ No newline at end of file |
...
|
...
|
|