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

更新资源部署

parent cc3ed4a6
...@@ -145,15 +145,18 @@ public class DeviceModuleDistributeController extends BaseCRUDJsonBodyMappingCon ...@@ -145,15 +145,18 @@ public class DeviceModuleDistributeController extends BaseCRUDJsonBodyMappingCon
@Override @Override
protected int viewAfter(Long id, Map<String, Object> model, DeviceModuleDistributeEntity entity, Context context) throws AppException { protected int viewAfter(Long id, Map<String, Object> model, DeviceModuleDistributeEntity entity, Context context) throws AppException {
DeviceModuleDistributeEntity deviceModuleDistributeEntity = this.service.get(entity.getId());
String serverName = request.getHeader("server-name"); String serverName = request.getHeader("server-name");
Integer serverPort = DataUtil.converStr2Int(request.getHeader("server-port"), 0); Integer serverPort = DataUtil.converStr2Int(request.getHeader("server-port"), 0);
String homeUrl = ""; String homeUrl = "";
ProductEntity productEntity = productService.get(entity.getProductId(), context); homeUrl = String.format("/homeDeviceUrl/%s/%s/%s", deviceModuleDistributeEntity.getSiteId(), deviceModuleDistributeEntity.getProductCode(), deviceModuleDistributeEntity.getImageResolutionValue());
if (!ObjectUtils.isEmpty(productEntity.getHomeUrl())) {
homeUrl = productEntity.getHomeUrl(); // ProductEntity productEntity = productService.get(entity.getProductId(), context);
} // if (!ObjectUtils.isEmpty(productEntity.getHomeUrl())) {
// homeUrl = productEntity.getHomeUrl();
// }
String domain = GlobalSysInfo.getParamValue(PARAM_SERVER_HTTP_URL, "http://192.168.0.98:11078"); String domain = GlobalSysInfo.getParamValue(PARAM_SERVER_HTTP_URL, "http://192.168.0.98:11078");
if (!ObjectUtils.isEmpty(serverName) && Validator.isIpv4(serverName)) { if (!ObjectUtils.isEmpty(serverName) && Validator.isIpv4(serverName)) {
String str = UrlBuilder.ofHttp(serverName).setPort(serverPort > 0 ? serverPort : 11078).addPath(homeUrl).build(); String str = UrlBuilder.ofHttp(serverName).setPort(serverPort > 0 ? serverPort : 11078).addPath(homeUrl).build();
......
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