服务属性
已发布数据的属性配置
GET 服务属性获取
GET /admin/tx/service/attr/get
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| folderId | query | string | 是 | 新文件ID |
返回示例
200 Response
json
{
"code": 0,
"msg": null,
"data": [
{
"id": "string",
"dataId": "string",
"createBy": "string",
"createTime": "string",
"delFlag": "string",
"folderId": "string",
"remark": "string",
"attrJson": "string",
"updateBy": "string",
"updateTime": "string",
"coverImg": "string",
"dataServiceId": "string"
}
],
"ok": true
}返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | none | |
| » msg | null | true | none | none | |
| » data | [object] | true | none | none | |
| »» id | string | false | none | 服务属性ID | |
| »» dataId | string | false | none | 源数据ID | |
| »» createBy | string | false | none | none | |
| »» createTime | string | false | none | none | |
| »» delFlag | string | false | none | none | |
| »» folderId | string | false | none | 新数据ID | |
| »» remark | string | false | none | 备注 | |
| »» attrJson | string | false | none | 属性配置 | |
| »» updateBy | string | false | none | none | |
| »» updateTime | string | false | none | none | |
| »» coverImg | string | false | none | 封面图片 | |
| »» dataServiceId | string | false | none | 服务ID | |
| » ok | boolean | true | none | none |
GET 服务属性批量获取
GET /admin/tx/service/attr/getByFolderIds
请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| folderIds | query | string | 是 | ,分割 新数据ID |
返回示例
json
{
"code": 0,
"msg": null,
"data": {
"asdadasd": []
},
"ok": true
}返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | none | |
| » msg | null | true | none | none | |
| » data | object | true | none | none | |
| »» asdadasd | [string] | true | none | none | |
| » ok | boolean | true | none | none |
POST 服务属性临时图片上传base64
POST /admin/tx/service/attr/uploadTempImg
Body 请求参数
json
{
"folderId": "a6c576cd8da1a9219503783c2f8b39f5",
"imageBase64Code": "base64图片"
}请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| Authorization | header | string | 是 | none |
| body | body | object | 否 | none |
| » folderId | body | string | 是 | 新数据ID |
| » imageBase64Code | body | string | 是 | 图片base64,仅支持image/jpeg |
返回示例
json
{
"code": 0,
"msg": null,
"data": "temp/dataServiceAttr/a6c576cd8da1a9219503783c2f8b39f5/image/be62d6a3-0ab9-43fe-8a7f-3e2af32aa851.jpg",
"ok": true
}返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | none | |
| » msg | null | true | none | none | |
| » data | string | true | none | none | |
| » ok | boolean | true | none | none |
POST 服务属性保存/编辑
POST /admin/tx/service/attr/save
Body 请求参数
json
{
"folderId": "3a43e94252eddf82397f301c7f6e542f",
"id": "d96de624f8e9c6ad346e351e3fa14a95",
"coverImg": "temp/dataServiceAttr/3a43e94252eddf82397f301c7f6e542f/image/0eaf215c-906e-4b20-9055-b90bf42fc82b.jpg",
"attrJson": "%7B%22lon%22%3A120.00000000000001%2C%22lat%22%3A29.999999999999993%2C%22height%22%3A0%2C%22opacity%22%3A100%2C%22granularity%22%3A10%2C%22attrVersion%22%3A1%2C%22modelMatrix%22%3A%5B1%2C0%2C0%2C0%2C0%2C1%2C0%2C0%2C0%2C0%2C1%2C0%2C0%2C0%2C0%2C1%5D%7D"
}请求参数
| 名称 | 位置 | 类型 | 必选 | 说明 |
|---|---|---|---|---|
| Authorization | header | string | 是 | none |
| body | body | object | 否 | none |
| » folderId | body | string | 是 | 新数据ID |
| » id | body | string | 否 | 服务属性记录ID,修改时需要传参该值 |
| » coverImg | body | string | 是 | 数据封面相对url |
| » attrJson | body | string | 是 | 服务属性配置信息 |
返回示例
json
{
"code": 0,
"msg": null,
"data": null,
"ok": true
}返回结果
| 状态码 | 状态码含义 | 说明 | 数据模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回数据结构
状态码 200
| 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
|---|---|---|---|---|---|
| » code | integer | true | none | none | |
| » msg | null | true | none | none | |
| » data | null | true | none | none | |
| » ok | boolean | true | none | none |