创建运营分类 /v2/resources/operation-categories/create POST JSON

参数名 参数类型 参数描述 必选
name string 名称
parentCode string 父类型编号,没有父类型填空字符串
sources {"identity":string, type:number}[] 映射数组
priority number 权重
status number 状态 1:开启 2:停用
startTime Date 开启时间
limitTime Date 结束时间

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": null
}
1
2
3
4
5
6
7

列出运营分类 /v2/resources/operation-categories/list GET QUERY

参数名 参数类型 参数描述 必选
skip number 跳过的数目
limit number 查询的数目
status number 状态 1:启用 2:停用
parentCode string 父类型编号
name string 名称

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": {
    "num": 6,
    "operationCategories": {
      "skip": 0,
      "limit": 10,
      "totalItem": 6,
      "dataList": [
        {
          "parentCode": "",
          "resourceCount": 0,
          "_id": "63f46d812ded492f6ccf4b18",
          "code": "RT0002",
          "name": "摄影",
          "sources": [
            {
              "parentCodeChain": [
                "RT003"
              ],
              "parentChain": [
                {
                  "code": "RT003",
                  "name": "test0"
                }
              ],
              "identity": "RT003",
              "name": "test0",
              "type": 1
            },
            {
              "parentCodeChain": [
                "RT0008001",
                "RT0008"
              ],
              "parentChain": [
                {
                  "code": "RT0008001",
                  "name": "test111"
                },
                {
                  "code": "RT0008",
                  "name": "test11"
                }
              ],
              "identity": "RT0008001",
              "name": "test111",
              "type": 1
            }
          ],
          "priority": 1,
          "status": 1,
          "startTime": "2023-02-20T16:00:00.000Z",
          "createDate": "2023-02-21T07:06:41.420Z",
          "updateDate": "2023-03-06T09:23:57.150Z"
        },
        {
          "parentCode": "",
          "resourceCount": 0,
          "_id": "6400410a460621002fa881cc",
          "code": "OC002",
          "name": "test",
          "sources": [
            {
              "parentCodeChain": [],
              "parentChain": [],
              "identity": "62383e9a2a1660002e5a6458",
              "name": "test111",
              "type": 3
            },
            {
              "parentCodeChain": [],
              "parentChain": [],
              "identity": "632d720bbb4c5d003a7c8a30",
              "name": "1414",
              "type": 3
            },
            {
              "parentCodeChain": [
                "RT003"
              ],
              "parentChain": [
                {
                  "code": "RT003",
                  "name": "test0"
                }
              ],
              "identity": "RT003",
              "name": "test0",
              "type": 1
            }
          ],
          "priority": 1,
          "status": 1,
          "createDate": "2023-03-02T06:24:10.524Z",
          "updateDate": "2023-03-06T09:19:52.637Z",
          "startTime": null
        },
        {
          "parentCode": "OC002",
          "resourceCount": 0,
          "_id": "64004253460621002fa8823d",
          "code": "OC002001",
          "name": "test1",
          "sources": [],
          "priority": 1,
          "status": 1,
          "createDate": "2023-03-02T06:29:39.867Z",
          "updateDate": "2023-03-02T06:45:32.466Z",
          "startTime": null,
          "parentName": "test"
        },
        {
          "parentCode": "OC002001",
          "resourceCount": 0,
          "_id": "64004614460621002fa885c6",
          "code": "OC002001001",
          "name": "test01",
          "sources": [],
          "priority": 2,
          "status": 2,
          "createDate": "2023-03-02T06:45:40.512Z",
          "updateDate": "2023-03-02T06:46:36.716Z",
          "startTime": null,
          "parentName": "test1"
        },
        {
          "parentCode": "OC002001",
          "resourceCount": 0,
          "_id": "64004628460621002fa8860f",
          "code": "OC002001002",
          "name": "test02",
          "sources": [],
          "priority": 3,
          "status": 2,
          "createDate": "2023-03-02T06:46:00.745Z",
          "updateDate": "2023-03-02T06:46:42.456Z",
          "startTime": null,
          "parentName": "test1"
        },
        {
          "parentCode": "OC002001",
          "resourceCount": 0,
          "_id": "6405982a35b161002f54dbbf",
          "code": "OC002001003",
          "name": "test03",
          "sources": [
            {
              "parentCodeChain": [
                "RT0004002001001",
                "RT0004002001",
                "RT0004002",
                "RT0004"
              ],
              "parentChain": [
                {
                  "code": "RT0004002001001",
                  "name": "玩具"
                },
                {
                  "code": "RT0004002001",
                  "name": "图片2"
                },
                {
                  "code": "RT0004002",
                  "name": "摄影6"
                },
                {
                  "code": "RT0004",
                  "name": "图片"
                }
              ],
              "identity": "RT0004002001001",
              "name": "玩具",
              "type": 1
            },
            {
              "parentCodeChain": [
                "RT0008001",
                "RT0008"
              ],
              "parentChain": [
                {
                  "code": "RT0008001",
                  "name": "test111"
                },
                {
                  "code": "RT0008",
                  "name": "test11"
                }
              ],
              "identity": "RT0008001",
              "name": "test111",
              "type": 1
            },
            {
              "parentCodeChain": [
                "RT0005"
              ],
              "parentChain": [
                {
                  "code": "RT0005",
                  "name": "摄影"
                }
              ],
              "identity": "RT0005",
              "name": "摄影",
              "type": 1
            },
            {
              "parentCodeChain": [
                "RT0004003",
                "RT0004"
              ],
              "parentChain": [
                {
                  "code": "RT0004003",
                  "name": "摄影7"
                },
                {
                  "code": "RT0004",
                  "name": "图片"
                }
              ],
              "identity": "RT0004003",
              "name": "摄影7",
              "type": 1
            }
          ],
          "priority": 3,
          "status": 1,
          "createDate": "2023-03-06T07:37:14.775Z",
          "updateDate": "2023-03-06T09:27:54.562Z",
          "startTime": null,
          "parentName": "test1"
        }
      ]
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243

结构参数:

参数名 参数类型 参数描述
parentCode string 父类型编号
parentName string 父类型名称
code string 编号
name string 名称
sources {"identity":string," type":number,"name":string,"parentCodeChain":string[],"parentChain":{}[]}[] 映射数组
resourceCount number 关联的资源数
priority number 权重
status number 状态 1:开启 2:停用
startTime Date 开启时间

编辑运营分类 /v2/resources/operation-categories/update POST JSON

参数名 参数类型 参数描述 必选
code string 编号
name string 名称
parentCode string 父类型编号
sources {"identity":string, type:number}[] 映射数组
priority number 权重
status number 状态 1:开启 2:停用
startTime Date 开启时间
limitTime Date 结束时间

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": null
}
1
2
3
4
5
6
7

简单根据父类型列出运营分类 /v2/resources/operation-categories/listSimpleByParentCode GET QUERY

参数名 参数类型 参数描述 必选
parentCode string 父类型编号

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": [
    {
      "_id": "63f487424c0d601b5cdb829f",
      "code": "RT0003",
      "name": "高清"
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13

结构参数:

参数名 参数类型 参数描述
code string 资源类型编号
name string 名称

取某运营分类的映射 /v2/resources/operation-categories/getSourcesByCode GET QUERY

参数名 参数类型 参数描述 必选
code string 运营分类编号

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": [
    {
      "parentCodeChain": [
        "RT003"
      ],
      "parentChain": [
        {
          "code": "RT003",
          "name": "test0"
        }
      ],
      "identity": "RT003",
      "name": "test0",
      "type": 1
    },
    {
      "parentCodeChain": [
        "RT0008001",
        "RT0008"
      ],
      "parentChain": [
        {
          "code": "RT0008001",
          "name": "test111"
        },
        {
          "code": "RT0008",
          "name": "test11"
        }
      ],
      "identity": "RT0008001",
      "name": "test111",
      "type": 1
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

结构参数:

参数名 参数类型 参数描述
identity string 标识
type number 类型 1:基础资源类型 2:自定义资源类型 3:资源标签
name string 名称
parentCodeChain string[] 依赖父类编号数组
parentChain {}[] 依赖父类数组

取某运营分类的映射信息 /v2/resources/operation-categories/getSourcesInfoByCode GET QUERY

参数名 参数类型 参数描述 必选
code string 运营分类编号

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": {
    "resourceTypeCodes": [
      "RT006001",
      "RT006002",
      "RT006003",
      "RT006004",
      "CRT006000001",
      "CRT006000002"
    ],
    "resourceTagNames": []
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

结构参数:

参数名 参数类型 参数描述
resourceTypeCodes string[] 资源类型编号数组
resourceTagNames string[] 资源标签名称数组

启用,暂停运营分类 /v2/resources/operation-categories/updateStatus POST JSON

参数名 参数类型 参数描述 必选
code string 运营分类编号
status number 状态 1:启用 2:暂停

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": null
}
1
2
3
4
5
6
7

批量启用,暂停运营分类 /v2/resources/operation-categories/updateStatusBatch POST JSON

参数名 参数类型 参数描述 必选
codes string[] 运营分类编号数组
status number 状态 1:启用 2:暂停

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": null
}
1
2
3
4
5
6
7

根据编号取运营分类 /v2/resources/operation-categories/getInfoByCode GET QUERY

参数名 参数类型 参数描述 必选
code string 运营分类编号

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": {
    "code": "OC002001003",
    "name": "test03",
    "parentCode": "OC002001",
    "sources": [
      {
        "parentCodeChain": [
          "RT0004002001001",
          "RT0004002001",
          "RT0004002",
          "RT0004"
        ],
        "parentChain": [
          {
            "code": "RT0004002001001",
            "name": "玩具"
          },
          {
            "code": "RT0004002001",
            "name": "图片2"
          },
          {
            "code": "RT0004002",
            "name": "摄影6"
          },
          {
            "code": "RT0004",
            "name": "图片"
          }
        ],
        "identity": "RT0004002001001",
        "name": "玩具",
        "type": 1
      },
      {
        "parentCodeChain": [
          "RT0008001",
          "RT0008"
        ],
        "parentChain": [
          {
            "code": "RT0008001",
            "name": "test111"
          },
          {
            "code": "RT0008",
            "name": "test11"
          }
        ],
        "identity": "RT0008001",
        "name": "test111",
        "type": 1
      },
      {
        "parentCodeChain": [
          "RT0005"
        ],
        "parentChain": [
          {
            "code": "RT0005",
            "name": "摄影"
          }
        ],
        "identity": "RT0005",
        "name": "摄影",
        "type": 1
      },
      {
        "parentCodeChain": [
          "RT0004003",
          "RT0004"
        ],
        "parentChain": [
          {
            "code": "RT0004003",
            "name": "摄影7"
          },
          {
            "code": "RT0004",
            "name": "图片"
          }
        ],
        "identity": "RT0004003",
        "name": "摄影7",
        "type": 1
      }
    ],
    "resourceCount": 0,
    "priority": 3,
    "status": 1,
    "startTime": null,
    "parentName": "test1"
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99

结构参数:

参数名 参数类型 参数描述
parentCode string 父类型编号
parentName string 父类型名称
code string 编号
name string 名称
sources {"identity":string," type":number,"name":string,"parentCodeChain":string[],"parentChain":{}[]}[] 映射数组
resourceCount number 关联的资源数
priority number 权重
status number 状态 1:开启 2:停用
startTime Date 开启时间

列出运营分类分组排序 /v2/resources/operation-categories/listSimpleByGroup GET QUERY

参数名 参数类型 参数描述 必选
name string 名称
status number 状态 1:启动 2:停用

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": [
    {
      "code": "RT0002",
      "parentCode": "",
      "name": "摄影",
      "resourceCount": 0,
      "priority": 1,
      "children": [
        {
          "code": "RT0003",
          "parentCode": "RT0002",
          "name": "高清",
          "resourceCount": 0,
          "priority": 1,
          "children": []
        }
      ]
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

结构参数:

参数名 参数类型 参数描述
parentCode string 父类型编号
resourceCount number 关联资源数量
code string 编号
name string 名称
priority number 权重
children {}[] 子类型数组

修改权重 /v2/resources/operation-categories/updatePriority POST JSON

参数名 参数类型 参数描述 必选
code string 资源类型编号
priority number 权重

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": null
}
1
2
3
4
5
6
7

删除运营分类 /v2/resources/operation-categories/delete POST JSON

参数名 参数类型 参数描述 必选
code string 资源类型编号

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": null
}
1
2
3
4
5
6
7