Commit e969d5df authored by 赵啸非's avatar 赵啸非

部署资源添加分辨率字典

parent 58bd1241
...@@ -224,6 +224,7 @@ public class DeviceApiController { ...@@ -224,6 +224,7 @@ public class DeviceApiController {
query.setImageResolution(resolution); query.setImageResolution(resolution);
query.setDistribute(DistributeEnum..getValue()); query.setDistribute(DistributeEnum..getValue());
DeviceModuleDistributeEntity distribute = deviceModuleDistributeService.selectOne(query); DeviceModuleDistributeEntity distribute = deviceModuleDistributeService.selectOne(query);
if(!ObjectUtils.isEmpty(distribute)){
//homeDeviceUrl/1/pdj/1920x1080 //homeDeviceUrl/1/pdj/1920x1080
String homeUrl = String.format("/homeDeviceUrl/%s/%s/%s", distribute.getSiteId(), distribute.getProductCode(), distribute.getImageResolutionValue()); String homeUrl = String.format("/homeDeviceUrl/%s/%s/%s", distribute.getSiteId(), distribute.getProductCode(), distribute.getImageResolutionValue());
//根据部署的资源 生成homeurl //根据部署的资源 生成homeurl
...@@ -242,6 +243,9 @@ public class DeviceApiController { ...@@ -242,6 +243,9 @@ public class DeviceApiController {
}else{ }else{
buildHomeUrlBySite(deviceEntity, productEntity, serverInfo, serverName, serverPort); buildHomeUrlBySite(deviceEntity, productEntity, serverInfo, serverName, serverPort);
} }
}else{
buildHomeUrlBySite(deviceEntity, productEntity, serverInfo, serverName, serverPort);
}
//对外地址,访问ip+端口 端口号由platformEntity.getSendUrl()获取 //对外地址,访问ip+端口 端口号由platformEntity.getSendUrl()获取
URI uri = new URI(platformEntity.getSendUrl()); URI uri = new URI(platformEntity.getSendUrl());
int port = uri.getPort(); int port = uri.getPort();
......
...@@ -111,12 +111,12 @@ client.global.set("authToken", JSON.parse(response.body).data); ...@@ -111,12 +111,12 @@ client.global.set("authToken", JSON.parse(response.body).data);
###注册设备 ###注册设备 D8-BB-C1-D7-E2-E3
POST {{baseUrl}}/api/register POST {{baseUrl}}/api/register
Content-Type: application/json Content-Type: application/json
{ {
"deviceCode": "5E-C5-16-0C-A6-0E" "deviceCode": "D8-BB-C1-D7-E2-E3"
} }
###获取产品与 ###获取产品与
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment