# 1.3.1 新增资讯产品文章

新增资讯产品文章

请求方式:POST

请求地址: {API_HOST}/api/v1/open/adviserZone/forward/articles

请求头部:

key value
Content-Type application/json
X-Consumer-Custom-ID "@staff_super:im.finogeeks.com"

请求参数说明:

参数 类型 是否必须 说明 默认值
adviserId string 投顾ID
categoryId string 文章栏目ID
title string 文章标题
text string 文章内容
type string 文章类型 : 观点文章 TIMELINE, 长文章 LONG, 转载文章 REPRINT, 行业文章 INDUSTRY
contents []Object
recommend boolean 是否推荐 true 推荐 false 不推荐
available boolean 是否上架 true 上架 false 不上架
tagIds []string 标签的id数组,标签的信息要要信导入到金易联系统里面,通过id关联,如果不使用标签,可以不传。
sourceId string 对接导入资讯的源id,根据这个id进行一一对应
originAuthor string 文章原作者
publishTime string 源文章发布时间
scheduleFlag int 0是不定时发布,1是定时发布,如果是定时发布,scheduleTime字段必填
scheduleTime Long 定时发布时间

​ 请求示例:

  #####       1.1 创建一个观点文章:
 {
    "adviserId": "@staff_super:im.finogeeks.com",
    "title": "这是一篇观点文章",
    "text": "阿达十大阿斯顿",
    "contents": [{
       "type": "VIDEO",
       "data": {
         "video": {
           "netdiskId": "5d511e54f0b4800001941c13",
           "height": 960,
           "width": 544
         }
       }
     }],
    "keywords": [],
    "categoryId": "5d4d443988d50c0001bf5c0a",
    "type": "TIMELINE",
    "recommend": true,
    "available": true,
}

# 1.3.2 查询文章列表接口

查询文章列表接口

请求方式:GET

请求地址:{API_HOST}/api/v1/open/adviserZone/forward/articles

请求头部:

key value
Content-Type application/json
X-Consumer-Custom-ID "@staff_super:im.finogeeks.com"

请求参数说明:

参数 类型 是否必须 说明 默认值
type string 文章类型,观点文章 TIMELINE,长文章 LONG,转载文章 REPRINT,多个用,分隔
categoryName string 文章栏目名
title string 文章标题
sourceId string 文章源id
page number 分页号码,默认0 0
size number 分页大小,默认每页20条 20

返回内容:

{
    "content": [
    {
      "id": "5d511e57fdb79200012cee8d",
      "adviserId": "@staff_super:im.finogeeks.com",
      "title": "这是一篇观点文章",
      "text": "阿达十大阿斯顿",
      "contents": [{
        "type": "VIDEO",
        "data": {
           "video": {
           "netdiskId": "5d511e54f0b4800001941c13",
           "height": 960,
           "width": 544
         }
       }
     }],
    "keywords": [],
    "categoryId": "5d4d443988d50c0001bf5c0a",
    "type": "TIMELINE",
    "recommend": true,
    "available": true,
   },
   {
      "id": "5d5124d811484600015f4556",
      "adviserId": "@staff_super:im.finogeeks.com",
      "title": "这是一篇富文本文章",
      "contents": [{
         "type": "RICH_TEXT"
      }],
      "text": "文章内容文章内容文章内容文章内容",
      "keywords": [],
      "articleId": "AR1908121635364800001",
      "categoryId": "5d5121c211484600015f4552",
      "type": "LONG",
      "recommend": true,
      "available": true,
      "auditor": "@staff_super:im.finogeeks.com",
   } ],
   "pageSize": 20,
   "pageNumber": 0,
   "offset": 0,
   "paged": true,
   "unpaged": false
   },
   "totalElements": 2,
   "last": true,
   "totalPages": 1,
   "first": true,
   "numberOfElements": 4,
   "size": 20,
   "number": 0
 }

# 1.3.3 新增文章栏目

新增文章栏目

请求方式:POST

请求地址:{API_HOST}/api/v1/open/adviserZone/forward/category

请求头部:

key value
Content-Type application/json
X-Consumer-Custom-ID "@staff_super:im.finogeeks.com"

请求参数说明:

参数 类型 是否必须 说明 默认值
name string 栏目名称
groupIds []string 栏目权限组织
resourceId string 栏目源id
picture string 栏目图片
desc string 栏目描述
link string 栏目链接

# 1.3.4 修改文章栏目信息

修改文章栏目信息

请求方式:PUT

请求地址:{API_HOST}/api/v1/open/adviserZone/forward/category/:id

请求头部:

key value
Content-Type application/json
X-Consumer-Custom-ID "@staff_super:im.finogeeks.com"

请求参数说明:

参数 类型 是否必须 说明 默认值
name string 栏目名称
order Int 栏目顺序
groupIds []string 栏目权限组织
resourceId string 栏目源id
picture string 栏目图片
desc string 栏目描述
link string 栏目链接

# 1.3.5 分页获取栏目列表

分页获取栏目列表

请求方式:GET

请求地址:{API_HOST}/api/v1/open/adviserZone/forward/category

请求头部:

key value
Content-Type application/json
X-Consumer-Custom-ID "@staff_super:im.finogeeks.com"

请求参数说明:

参数 类型 是否必须 说明 默认值
name string 栏目名称
resourceId string 栏目源id
page string 分页页码 0
size string 每页返回条数 10

返回内容:

{
    "content": [{
       "id": "22db4e7a-0f0f-4827-9e07-bd23c43252f9",
       "name": "栏目名称",
       "order": 1,
       "createAt": "创建时间戳",
       "creator": "创建人",
       "resourceId": "",  //栏目源id
    },
    {
      "id": "22db4e7a-0f0f-4827-9e07-bd23c43252f9",
      "name": "栏目名称",
      "order": 1,
      "createAt": "创建时间戳",
      "creator": "创建人",
      "resourceId": "",   //栏目源id
     }],
     "pageable": {
      "pageSize": 20,
      "pageNumber": 0,
      "offset": 0,
      "unpaged": false,
      "paged": true
     },
    "totalPages": 1,
    "totalElements": 1,
    "numberOfElements": 1,
    "size": 20, //每页个数
    "number": 0 //页数
}

# 1.3.6 新建文章标签

新建文章标签

  说明:文章是带有标签信息,所以在创建文章的时候,可以指定给文章带上标签信息。

请求方式:POST

请求地址:{API_HOST}/api/v1/open/adviserZone/tags

请求头部:

key value
Content-Type application/json
X-Consumer-Custom-ID "@staff_super:im.finogeeks.com"

请求参数说明:

参数 类型 是否必须 说明 默认值
name string 标签名称
parentId string 父级标签id,如果该标签是第一级,可以不传该参数

请求示例Body:

{
    "name": "资产率高",
    "parentId": "6051cff0c2577900015de02a"
}

返回内容:

{
    "id":"6051d0fac2577900015de02b",
    "name":"资产率高",
    "parentIds":["6051cff0c2577900015de02a"],
    "creator":"@staff_super_M00000:000000.finogeeks.com",
    "createAt":1615974650050,
    "updater":"@staff_super_M00000:000000.finogeeks.com",
    "updateAt":1615974650050,
    "level":2,
    "leaf":true
}

# 1.3.7 查询所有标签信息

标签查询,该接口返回所有的标签信息

  请求方式:GET

  请求地址:{API_HOST}/api/v1/open/adviserZone/tags

  请求头部:

  | key                  | value                           |
  | -------------------- | ------------------------------- |
  | Content-Type         | application/json                |
  | X-Consumer-Custom-ID | "@staff_super:im.finogeeks.com" |

  请求参数说明:无相关参数

  响应Body:

  ```
  {
      "name": "资产率高",
      "parentId": "6051cff0c2577900015de02a"
  }
  ```

  返回内容:
{
	"content": [{
		"id": "5f983c193193470001eddcf4",
		"name": "标签信息",
		"children": [{
			"id": "5f983c193193470001eddcf5",
			"name": "高收益",
			"parentId": "5f983c193193470001eddcf4",
			"leaf": true
		}, {
			"id": "5f983c193193470001eddcf6",
			"name": "test132",
			"parentId": "5f983c193193470001eddcf4",
			"leaf": true
		}, {
			"id": "60373a6c904bbc0001efa37e",
			"name": "test",
			"parentId": "5f983c193193470001eddcf4",
			"children": [{
				"id": "60373ae6904bbc0001efa383",
				"name": "testchd",
				"parentId": "60373a6c904bbc0001efa37e",
				"leaf": true
			}],
			"leaf": false
		}],
		"leaf": false
	}]
}