获取产品列表
文档信息
| 字段 | 内容 |
|---|---|
| 关联产品 | [[DTS]] |
| 服务名称 | Microservice-DigitalTwin-Center |
| 接口类型 | 对外开放接口 |
| 协议类型 | HTTP |
| 当前版本 | v1.0.0 |
| 维护人 | 产品组 |
| 适用对象 | 后端开发 / 第三方集成商 |
服务接口简介
分页获取产品列表信息。
接口信息
| 项 | 内容 |
|---|---|
| 方法 | POST |
| 路径 | /bv-microservice-digitaltwin-center/product/findProductPage |
| 协议 | HTTP |
| 是否鉴权 | 是 |
| 幂等性 | 否 |
| 超时时间建议 | 5s |
请求参数
请求体:
| 字段 | 类型 | 是否必填 | 说明 | 示例 |
|---|---|---|---|---|
currentPage |
false |
否 | 当前页码(默认第一页) | 0 |
pageSize |
false |
否 | 每页条数(默认10条) | 0 |
primaryIndustryCategory |
false |
否 | 一级行业类别 | - |
productName |
false |
否 | 产品名称 | - |
productSourceType |
false |
否 | 类型 0 动态资源 1 静态资源(poi) 2 组合产品 | 0 |
productTagList |
false |
否 | 产品标签 | [{"tagKey": "", "tagValue": ""}] |
+tagKey |
false |
否 | 标签key | - |
+tagValue |
false |
否 | 标签value | - |
secondaryIndustryCategory |
false |
否 | 二级行业类别 | - |
sortColumn |
true |
否 | 排序字段 0 产品名称 1 创建时间 2 更新时间 | 0 |
sortOrder |
true |
否 | 排序顺序 0 升序 1 降序 | 0 |
请求体示例:
{
"currentPage": 0,
"pageSize": 0,
"primaryIndustryCategory": "",
"productName": "",
"productSourceType": 0,
"productTagList": [
{
"tagKey": "",
"tagValue": ""
}
],
"secondaryIndustryCategory": "",
"sortColumn": 0,
"sortOrder": 0
}
响应参数
| 字段 | 类型 | 说明 | 示例 |
|---|---|---|---|
code |
integer(int32) |
- | 0 |
info |
PageVO«ProductVO» |
- | {"currentPage": 0, "list": [{"addTime": "", "addUser": "", "deviceCount": 0, "gatewayVO": {"addTime": "", "bvProductList": [{"addTime": "", "addUser": "", "positionCoordinateSystemId": 0, "productAccessGatewayProtocol": 0, "productAuthenticationMethod": 0, "productCategory": 0, "productDataFormat": 0, "productDescription": "", "productId": "", "productName": "", "productNormCategoryId": "", "productSecret": "", "productSourceType": 0, "templateId": "", "updateTime": ""}], "deviceCount": 0, "gatewayAccessKey": "", "gatewayAccessSecret": "", "gatewayDescription": "", "gatewayId": "", "gatewayIdentifier": "", "gatewayName": "", "gatewayType": 0, "updateTime": ""}, "positionCoordinateSystemId": 0, "primaryIndustryCategory": "", "productAccessGatewayProtocol": 0, "productAuthenticationMethod": 0, "productCategory": 0, "productDataFormat": 0, "productDescription": "", "productId": "", "productName": "", "productNormCategoryId": "", "productSecret": "", "productSourceType": 0, "secondaryIndustryCategory": "", "templateId": "", "updateTime": ""}], "pageSize": 0, "totalPage": 0, "totalRow": 0} |
currentPage |
integer(int64) |
当前页码 | 0 |
list |
array |
分页数据列表 | [{"addTime": "", "addUser": "", "deviceCount": 0, "gatewayVO": {"addTime": "", "bvProductList": [{"addTime": "", "addUser": "", "positionCoordinateSystemId": 0, "productAccessGatewayProtocol": 0, "productAuthenticationMethod": 0, "productCategory": 0, "productDataFormat": 0, "productDescription": "", "productId": "", "productName": "", "productNormCategoryId": "", "productSecret": "", "productSourceType": 0, "templateId": "", "updateTime": ""}], "deviceCount": 0, "gatewayAccessKey": "", "gatewayAccessSecret": "", "gatewayDescription": "", "gatewayId": "", "gatewayIdentifier": "", "gatewayName": "", "gatewayType": 0, "updateTime": ""}, "positionCoordinateSystemId": 0, "primaryIndustryCategory": "", "productAccessGatewayProtocol": 0, "productAuthenticationMethod": 0, "productCategory": 0, "productDataFormat": 0, "productDescription": "", "productId": "", "productName": "", "productNormCategoryId": "", "productSecret": "", "productSourceType": 0, "secondaryIndustryCategory": "", "templateId": "", "updateTime": ""}] |
addTime |
string |
- | - |
addUser |
string |
- | - |
deviceCount |
integer |
设备数量 | - |
gatewayVO |
GatewayVO |
所属网关 | - |
addTime |
string |
创建时间 | - |
bvProductList |
array |
关联产品 | - |
addTime |
string |
- | - |
addUser |
string |
- | - |
positionCoordinateSystemId |
integer |
位置坐标系统编号 | - |
productAccessGatewayProtocol |
integer |
接入网关协议 0 标准网关协议(HTTP) 1 自定义网关协议 | - |
productAuthenticationMethod |
integer |
认证方式 0 设备密钥 | - |
productCategory |
integer |
品类 0 自定义品类 1 标准品类 | - |
productDataFormat |
integer |
数据格式 0 透传/自定义 1 标准数据格式(BV JSON) | - |
productDescription |
string |
产品描述 | - |
productId |
string |
产品编号 | - |
productName |
string |
产品名称 | - |
productNormCategoryId |
string |
标准品类编号(选择自定义品类时为null) | - |
productSecret |
string |
产品签名 | - |
productSourceType |
integer |
资源类型 0 动态资源 1 静态资源(poi) 2 组合产品 | - |
templateId |
string |
产品属性详情模板编号 | - |
updateTime |
string |
- | - |
deviceCount |
integer |
设备数量 | - |
gatewayAccessKey |
string |
接入网关身份标识 | - |
gatewayAccessSecret |
string |
接入网关密钥 | - |
gatewayDescription |
string |
网关描述 | - |
gatewayId |
string |
编号 | - |
gatewayIdentifier |
string |
网关标识符 | - |
gatewayName |
string |
网关名称 | - |
gatewayType |
integer |
网关类型 0 Dumb网关(默认) 1 视频网关 2 第三方接入网关 | - |
updateTime |
string |
更新时间 | - |
positionCoordinateSystemId |
integer |
位置坐标系统编号 | - |
primaryIndustryCategory |
string |
一级行业类别 | - |
productAccessGatewayProtocol |
integer |
接入网关协议 0 标准网关协议(HTTP) 1 自定义网关协议 | - |
productAuthenticationMethod |
integer |
认证方式 0 设备密钥 | - |
productCategory |
integer |
品类 0 自定义品类 1 标准品类 | - |
productDataFormat |
integer |
数据格式 0 透传/自定义 1 标准数据格式(BV JSON) | - |
productDescription |
string |
产品描述 | - |
productId |
string |
产品编号 | - |
productName |
string |
产品名称 | - |
productNormCategoryId |
string |
标准品类编号(选择自定义品类时为null) | - |
productSecret |
string |
产品签名 | - |
productSourceType |
integer |
资源类型 0 动态资源 1 静态资源(poi) 2 组合产品 | - |
secondaryIndustryCategory |
string |
二级行业类别 | - |
templateId |
string |
产品属性详情模板编号 | - |
updateTime |
string |
- | - |
pageSize |
integer(int64) |
每页条数 | 0 |
totalPage |
integer(int64) |
总页数 | 0 |
totalRow |
integer(int64) |
总记录数 | 0 |
message |
string |
- | - |
响应示例:
{
"code": 0,
"info": {
"currentPage": 0,
"list": [
{
"addTime": "",
"addUser": "",
"deviceCount": 0,
"gatewayVO": {
"addTime": "",
"bvProductList": [
{
"addTime": "",
"addUser": "",
"positionCoordinateSystemId": 0,
"productAccessGatewayProtocol": 0,
"productAuthenticationMethod": 0,
"productCategory": 0,
"productDataFormat": 0,
"productDescription": "",
"productId": "",
"productName": "",
"productNormCategoryId": "",
"productSecret": "",
"productSourceType": 0,
"templateId": "",
"updateTime": ""
}
],
"deviceCount": 0,
"gatewayAccessKey": "",
"gatewayAccessSecret": "",
"gatewayDescription": "",
"gatewayId": "",
"gatewayIdentifier": "",
"gatewayName": "",
"gatewayType": 0,
"updateTime": ""
},
"positionCoordinateSystemId": 0,
"primaryIndustryCategory": "",
"productAccessGatewayProtocol": 0,
"productAuthenticationMethod": 0,
"productCategory": 0,
"productDataFormat": 0,
"productDescription": "",
"productId": "",
"productName": "",
"productNormCategoryId": "",
"productSecret": "",
"productSourceType": 0,
"secondaryIndustryCategory": "",
"templateId": "",
"updateTime": ""
}
],
"pageSize": 0,
"totalPage": 0,
"totalRow": 0
},
"message": ""
}
调用示例
curl 示例:
curl -X POST "http://<Host>/bv-microservice-digitaltwin-center/product/findProductPage" \
-H "bv-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"currentPage": 0, "pageSize": 0, "primaryIndustryCategory": "", "productName": "", "productSourceType": 0, "productTagList": [{"tagKey": "", "tagValue": ""}], "secondaryIndustryCategory": "", "sortColumn": 0, "sortOrder": 0}'
接口错误码
| 错误码 | HTTP 状态 | 场景 | 处理建议 |
|---|---|---|---|
200 |
200 |
创建成功 (返回产品详情) | 成功 |
201 |
201 |
Created (资源已创建) | 创建成功 |
401 |
401 |
未授权 (需要认证信息) | 请登录通用用户系统获取 API Key,并在 Header 中携带 bv-api-key |
403 |
403 |
禁止访问 (权限不足) | 请检查该 API Key 是否被授权访问该接口 |
404 |
404 |
接口不存在 (检查接口地址) | 检查接口 URL 是否正确 |
备注
- 前置条件:API Key 已在“通用用户系统”中创建并关联了相应的 DTS 权限。
- 副作用:无。
作者:北京-产品-yantings 创建时间:2025-11-05 16:43
最后编辑:北京-产品-yantings 更新时间:2026-07-07 18:15
最后编辑:北京-产品-yantings 更新时间:2026-07-07 18:15