Commit 3769ac12 authored by 赵啸非's avatar 赵啸非

修改宜宾测试环境

parent ad6c178b
...@@ -12,4 +12,4 @@ VUE_APP_PORTAL_URL = /portal_home ...@@ -12,4 +12,4 @@ VUE_APP_PORTAL_URL = /portal_home
# 站点请求地址 # 站点请求地址
VUE_APP_SITETREE_URL = /basics_api/base/site/siteTree VUE_APP_SITETREE_URL = http://192.168.5.114:11078/base/site/siteTree
...@@ -5,8 +5,8 @@ import cookie from "./cookie"; ...@@ -5,8 +5,8 @@ import cookie from "./cookie";
import httpErrorHandler from "./httpErrorHandler"; import httpErrorHandler from "./httpErrorHandler";
const instance = axios.create({ const instance = axios.create({
// baseURL: "/m", baseURL: "/m",
baseURL: process.env.VUE_APP_BASE_API, //baseURL: process.env.VUE_APP_BASE_API,
headers: { headers: {
post: { post: {
"Content-Type": "application/json;charset=UTF-8", "Content-Type": "application/json;charset=UTF-8",
......
...@@ -17,8 +17,8 @@ module.exports = { ...@@ -17,8 +17,8 @@ module.exports = {
hot: true,//自动保存 hot: true,//自动保存
proxy: { proxy: {
'/m': { '/m': {
// target: 'http://192.168.0.98:11078', target: 'http://192.168.0.98:11078',
target: 'http://127.0.0.1:18222', //target: 'http://127.0.0.1:18222',
changeOrigin: true, changeOrigin: true,
secure: false, secure: false,
cookieDomainRewrite: 'plm.testnew.com', cookieDomainRewrite: 'plm.testnew.com',
......
...@@ -92,6 +92,43 @@ ...@@ -92,6 +92,43 @@
<skipDeploy>false</skipDeploy> <skipDeploy>false</skipDeploy>
</properties> </properties>
</profile> </profile>
<profile>
<id>yibin-test</id>
<properties>
<profiles.active>yibin-test</profiles.active>
<profiles.server.path>/m</profiles.server.path>
<profiles.publish.path>/home/publish</profiles.publish.path>
<profiles.server.port>18222</profiles.server.port>
<profiles.platform.type>cloud</profiles.platform.type>
<profiles.datasource.uri>
<![CDATA[jdbc:mysql://127.0.0.1:3306/device-new-platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]></profiles.datasource.uri>
<profiles.datasource.username>root</profiles.datasource.username>
<profiles.datasource.password>xhx@2022</profiles.datasource.password>
<profiles.redis.uri>127.0.0.1</profiles.redis.uri>
<profiles.redis.port>6379</profiles.redis.port>
<profiles.redis.username></profiles.redis.username>
<profiles.redis.password>hotel@2020</profiles.redis.password>
<profiles.redis.database>6</profiles.redis.database>
<profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
<profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
<profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
<profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
<profiles.rabbitmq.exchange>amp.direct</profiles.rabbitmq.exchange>
<profiles.sms.smsSendUrl>http://127.0.0.1:8089/api/index/index</profiles.sms.smsSendUrl>
<profiles.sms.apiId>k6BVS1PEbyzcJAE4</profiles.sms.apiId>
<profiles.sms.type>3</profiles.sms.type>
<profiles.filepath>/mortals/app/data</profiles.filepath>
<profiles.log.level>INFO</profiles.log.level>
<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
<profiles.log.path>/home/mortals/app/logs</profiles.log.path>
<package.environment>test</package.environment>
<skipDeploy>false</skipDeploy>
</properties>
</profile>
<profile> <profile>
<id>product</id> <id>product</id>
<properties> <properties>
...@@ -146,13 +183,13 @@ ...@@ -146,13 +183,13 @@
<profiles.redis.username></profiles.redis.username> <profiles.redis.username></profiles.redis.username>
<profiles.redis.password>hotel@2020</profiles.redis.password> <profiles.redis.password>hotel@2020</profiles.redis.password>
<profiles.redis.database>6</profiles.redis.database> <profiles.redis.database>6</profiles.redis.database>
<profiles.rabbitmq.host>172.15.28.120</profiles.rabbitmq.host> <profiles.rabbitmq.host>172.15.28.115</profiles.rabbitmq.host>
<profiles.rabbitmq.port>5672</profiles.rabbitmq.port> <profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
<profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username> <profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
<profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password> <profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
<profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost> <profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
<profiles.rabbitmq.exchange>amp.direct</profiles.rabbitmq.exchange> <profiles.rabbitmq.exchange>amp.direct</profiles.rabbitmq.exchange>
<profiles.sms.smsSendUrl>http://172.15.28.114:8089/api/index/index</profiles.sms.smsSendUrl> <profiles.sms.smsSendUrl>http://172.15.28.116:8089/api/index/index</profiles.sms.smsSendUrl>
<profiles.sms.apiId>k6BVS1PEbyzcJAE4</profiles.sms.apiId> <profiles.sms.apiId>k6BVS1PEbyzcJAE4</profiles.sms.apiId>
<profiles.sms.type>3</profiles.sms.type> <profiles.sms.type>3</profiles.sms.type>
<profiles.log.path>/home/mortals/app/logs</profiles.log.path> <profiles.log.path>/home/mortals/app/logs</profiles.log.path>
...@@ -165,6 +202,8 @@ ...@@ -165,6 +202,8 @@
<skipDeploy>false</skipDeploy> <skipDeploy>false</skipDeploy>
</properties> </properties>
</profile> </profile>
</profiles> </profiles>
<properties> <properties>
......
package com.mortals.xhx.base.system.param.service.impl; package com.mortals.xhx.base.system.param.service.impl;
import cn.hutool.core.util.StrUtil;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.framework.service.IParam; import com.mortals.framework.service.IParam;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import com.mortals.framework.util.DataUtil; import com.mortals.framework.util.DataUtil;
...@@ -32,6 +34,16 @@ public class ParamServiceImpl extends AbstractCRUDCacheServiceImpl<ParamDao, Par ...@@ -32,6 +34,16 @@ public class ParamServiceImpl extends AbstractCRUDCacheServiceImpl<ParamDao, Par
return "ParamEntity.paramKey"; return "ParamEntity.paramKey";
} }
@Override
protected void saveBefore(ParamEntity entity, Context context) throws AppException {
//过滤换行符
entity.setParamKey(StrUtil.removeAllLineBreaks(entity.getParamKey()));
entity.setParamValue(StrUtil.removeAllLineBreaks(entity.getParamValue()));
super.saveBefore(entity, context);
}
@Override @Override
public String getValueByKey(String key) { public String getValueByKey(String key) {
List<ParamEntity> list = this.getCacheList(); List<ParamEntity> list = this.getCacheList();
......
...@@ -2,6 +2,7 @@ package com.mortals.xhx.busiz.web; ...@@ -2,6 +2,7 @@ package com.mortals.xhx.busiz.web;
import cn.hutool.core.net.url.UrlBuilder; import cn.hutool.core.net.url.UrlBuilder;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.URLUtil; import cn.hutool.core.util.URLUtil;
import cn.hutool.extra.servlet.ServletUtil; import cn.hutool.extra.servlet.ServletUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
...@@ -107,6 +108,9 @@ public class DeviceApiController { ...@@ -107,6 +108,9 @@ public class DeviceApiController {
private String messageTtl; private String messageTtl;
@Value("${token.secret}") @Value("${token.secret}")
private String secret; private String secret;
//private String masterhost = "10.12.185.213";
//private String phpUrl = "http://10.12.185.213:8090";
@Autowired @Autowired
private SendTaskThreadPool sendTaskThreadPool; private SendTaskThreadPool sendTaskThreadPool;
@Autowired @Autowired
...@@ -144,7 +148,7 @@ public class DeviceApiController { ...@@ -144,7 +148,7 @@ public class DeviceApiController {
try { try {
DeviceEntity deviceEntity = checkDeviceExistAndCreate(req); DeviceEntity deviceEntity = checkDeviceExistAndCreate(req);
DeviceQueueAuthInfo authInfo = new DeviceQueueAuthInfo(); DeviceQueueAuthInfo authInfo = new DeviceQueueAuthInfo();
// authInfo.setHost(host); //authInfo.setHost(masterhost);
authInfo.setHost(url.getHost()); authInfo.setHost(url.getHost());
authInfo.setPort(port); authInfo.setPort(port);
authInfo.setUsername(username); authInfo.setUsername(username);
...@@ -183,7 +187,11 @@ public class DeviceApiController { ...@@ -183,7 +187,11 @@ public class DeviceApiController {
//判断设备是否设置了url 如果设置了,则用设备的 否则用产品的 //判断设备是否设置了url 如果设置了,则用设备的 否则用产品的
buildHomeUrl(deviceEntity, productEntity, serverInfo); buildHomeUrl(deviceEntity, productEntity, serverInfo);
serverInfo.setServerUrl(platformEntity.getSendUrl()); //对外
// serverInfo.setServerUrl(platformEntity.getSendUrl());
String phpUrl=GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_HTTP_URL, "http://10.12.185.213:8090");
serverInfo.setServerUrl(phpUrl);
registerResp.setServiceInfo(serverInfo); registerResp.setServiceInfo(serverInfo);
DeviceInfo deviceInfo = new DeviceInfo(); DeviceInfo deviceInfo = new DeviceInfo();
deviceInfo.setSiteId(deviceEntity.getSiteId()); deviceInfo.setSiteId(deviceEntity.getSiteId());
...@@ -196,6 +204,7 @@ public class DeviceApiController { ...@@ -196,6 +204,7 @@ public class DeviceApiController {
deviceInfo.setSource(deviceEntity.getSource()); deviceInfo.setSource(deviceEntity.getSource());
registerResp.setDeviceInfo(deviceInfo); registerResp.setDeviceInfo(deviceInfo);
log.info("resp:" + JSON.toJSONString(registerResp));
String content = EncryptUtil.myEnscrt(JSON.toJSONString(registerResp), 9, DES_STR, ENCRYPT_STR); String content = EncryptUtil.myEnscrt(JSON.toJSONString(registerResp), 9, DES_STR, ENCRYPT_STR);
deviceResp.setContent(content); deviceResp.setContent(content);
deviceEntity.setOnlineTime(new Date()); deviceEntity.setOnlineTime(new Date());
...@@ -203,6 +212,7 @@ public class DeviceApiController { ...@@ -203,6 +212,7 @@ public class DeviceApiController {
deviceEntity.setDeviceVersion(req.getDeviceVersion() == null ? "" : req.getDeviceVersion()); deviceEntity.setDeviceVersion(req.getDeviceVersion() == null ? "" : req.getDeviceVersion());
deviceService.getDeviceDao().update(deviceEntity); deviceService.getDeviceDao().update(deviceEntity);
rsp.setData(deviceResp); rsp.setData(deviceResp);
deviceService.sendThirdParty(deviceEntity, productEntity, platformEntity, DeviceMethodEnum.ONLINE); deviceService.sendThirdParty(deviceEntity, productEntity, platformEntity, DeviceMethodEnum.ONLINE);
} catch (AppException e) { } catch (AppException e) {
log.error("接收数据失败", e); log.error("接收数据失败", e);
...@@ -388,7 +398,7 @@ public class DeviceApiController { ...@@ -388,7 +398,7 @@ public class DeviceApiController {
DeviceQueueAuthInfo authInfo = new DeviceQueueAuthInfo(); DeviceQueueAuthInfo authInfo = new DeviceQueueAuthInfo();
URL url = getServerUrl(); URL url = getServerUrl();
//authInfo.setHost(host); //authInfo.setHost(masterhost);
authInfo.setHost(url.getHost()); authInfo.setHost(url.getHost());
authInfo.setPort(port); authInfo.setPort(port);
authInfo.setUsername(username); authInfo.setUsername(username);
...@@ -406,7 +416,9 @@ public class DeviceApiController { ...@@ -406,7 +416,9 @@ public class DeviceApiController {
ServerInfo serverInfo = new ServerInfo(); ServerInfo serverInfo = new ServerInfo();
buildHomeUrl(deviceEntity, productEntity, serverInfo); buildHomeUrl(deviceEntity, productEntity, serverInfo);
serverInfo.setServerUrl(platformEntity.getSendUrl()); //serverInfo.setServerUrl(platformEntity.getSendUrl());
String phpUrl=GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_HTTP_URL, "http://10.12.185.213:8090");
serverInfo.setServerUrl(phpUrl);
registerResp.setServiceInfo(serverInfo); registerResp.setServiceInfo(serverInfo);
DeviceInfo deviceInfo = new DeviceInfo(); DeviceInfo deviceInfo = new DeviceInfo();
...@@ -459,7 +471,7 @@ public class DeviceApiController { ...@@ -459,7 +471,7 @@ public class DeviceApiController {
productVersionQuery.setOrderKind(OrderCol.DESCENDING); productVersionQuery.setOrderKind(OrderCol.DESCENDING);
ProductVersionEntity productVersionEntity = productVersionService.selectOne(productVersionQuery); ProductVersionEntity productVersionEntity = productVersionService.selectOne(productVersionQuery);
if (ObjectUtils.isEmpty(productVersionEntity)){ if (ObjectUtils.isEmpty(productVersionEntity)) {
throw new AppException(DEVICE_VERSION_UNEXIST, DEVICE_VERSION_UNEXIST_CONTENT); throw new AppException(DEVICE_VERSION_UNEXIST, DEVICE_VERSION_UNEXIST_CONTENT);
} }
...@@ -503,7 +515,7 @@ public class DeviceApiController { ...@@ -503,7 +515,7 @@ public class DeviceApiController {
deviceEntity.setDeviceCode(req.getDeviceCode()); deviceEntity.setDeviceCode(req.getDeviceCode());
deviceEntity.setEnabled(YesNoEnum.YES.getValue()); deviceEntity.setEnabled(YesNoEnum.YES.getValue());
deviceEntity.setDeviceStatus( DeviceStatusEnum.未激活.getValue()); deviceEntity.setDeviceStatus(DeviceStatusEnum.未激活.getValue());
deviceEntity.setSource(req.getSource()); deviceEntity.setSource(req.getSource());
} }
...@@ -536,7 +548,7 @@ public class DeviceApiController { ...@@ -536,7 +548,7 @@ public class DeviceApiController {
rsp.setMsg(ApiRespCodeEnum.SUCCESS.getLabel()); rsp.setMsg(ApiRespCodeEnum.SUCCESS.getLabel());
rsp.setCode(ApiRespCodeEnum.SUCCESS.getValue()); rsp.setCode(ApiRespCodeEnum.SUCCESS.getValue());
try { try {
DownMsgTask downMsgTask = new DownMsgTask(list, platformService, productService, deviceService, deviceLogService,messageProducer); DownMsgTask downMsgTask = new DownMsgTask(list, platformService, productService, deviceService, deviceLogService, messageProducer);
sendTaskThreadPool.execute(downMsgTask); sendTaskThreadPool.execute(downMsgTask);
} catch (AppException e) { } catch (AppException e) {
log.error("接收数据失败", e); log.error("接收数据失败", e);
...@@ -850,10 +862,13 @@ public class DeviceApiController { ...@@ -850,10 +862,13 @@ public class DeviceApiController {
if (!ObjectUtils.isEmpty(deviceEntity.getHomeUrl())) { if (!ObjectUtils.isEmpty(deviceEntity.getHomeUrl())) {
homeUrl = deviceEntity.getHomeUrl(); homeUrl = deviceEntity.getHomeUrl();
} }
log.info("domain:"+GlobalSysInfo.getParamValue(PARAM_SERVER_HTTP_URL,"")); log.info("domain:" + GlobalSysInfo.getParamValue(PARAM_SERVER_HTTP_URL, ""));
String domain = GlobalSysInfo.getParamValue(PARAM_SERVER_HTTP_URL, "http://192.168.3.24:11078"); String domain = GlobalSysInfo.getParamValue(PARAM_SERVER_HTTP_URL, "http://192.168.3.24:11078");
serverInfo.setHomeUrl(UrlBuilder.of(domain).addPath(homeUrl).toString());
log.info("homeurl:"+serverInfo.getHomeUrl()); //domain+homeUrl;
serverInfo.setHomeUrl(UrlBuilder.of(domain.trim()).addPath(homeUrl).toString());
//serverInfo.setHomeUrl(domain + "/" + homeUrl);
log.info("homeurl:" + serverInfo.getHomeUrl());
serverInfo.setEventUrl(productEntity.getEventUrl()); serverInfo.setEventUrl(productEntity.getEventUrl());
} }
...@@ -864,7 +879,27 @@ public class DeviceApiController { ...@@ -864,7 +879,27 @@ public class DeviceApiController {
} }
String domain = GlobalSysInfo.getParamValue(PARAM_SERVER_HTTP_URL, "http://192.168.0.98:11091"); String domain = GlobalSysInfo.getParamValue(PARAM_SERVER_HTTP_URL, "http://192.168.0.98:11091");
//String temp = domain + "/" + download;
productVersionInfo.setDownloadUrl(UrlBuilder.of(domain).addPath(download).toString()); productVersionInfo.setDownloadUrl(UrlBuilder.of(domain).addPath(download).toString());
//productVersionInfo.setDownloadUrl(temp);
log.info("downurl:" + productVersionInfo.getDownloadUrl());
}
public static void main(String[] args) {
String domain = "http://10.12.185.213\r" +
":11078";
// URL url = URLUtil.url(domain);
System.out.println(StrUtil.removeAllLineBreaks(domain));
/* String content="OTFENjJBODBBRjFFNDNERDVGMDVGNkY3RTg1MEVDNDIxQUNFNTRCRDhDQTM2QjNGM0MwNEUyNERGOTg3NzVCNjRDRkU1MDg0NjU0QjU1ODgzRTg2OUM4MUJGRTE3ODQzRjJFQkMwNjdEMTRCRTdCQ0RDRENBNDFEQkJEMzQyRThGMzUzOTQ3MjVFRjE5RDUzOTlBMTAxQkM0MzZDRTY4M0Y0Mzg5OD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RTZDNjc2MjIxNUU3QUU1NTlFREFCODc3M0M4N0JFNDI2MkE2RjkxQUY4NjYwQ0Y0MjNBNjM1MjFDMUQ5RjNCRUJEMkQ0MDdCNzNBRTYwRENGNDY2NDY4Mjk5MDc4NkEyRUU5MkQ3Mjc3N0YyREVFOEY1NzNBQzFBMjI2MjA3RTNEQjYzMzc5MjI2ODUwQ0Y5MjU3QjIzNDEzQTQ5OEYxMEQ2MjI1OTc0QjUyQUU1QzcyQjg1Qjg0Qjg1QUJFNkExRjlEMTYzMUEyRTNCMUQ4MDg4QzMxNzQyREQyRUU5NzA3QzRGMzY0RDlCNzIwRkVFM0Q5QTU5NjAyQUNBQzVCMjBGREQ2Q0ZCQUUzOUZCM0U2MTQyOQ==";
String decrypt = EncryptUtil.decrypt(content, ENCRYPT_STR);
System.out.println(decrypt);*/
} }
} }
...@@ -44,8 +44,8 @@ public final class Constant { ...@@ -44,8 +44,8 @@ public final class Constant {
public static final String ENCRYPT_STR = "w4*KbUamPdZDnDpG"; public static final String ENCRYPT_STR = "w4*KbUamPdZDnDpG";
public static final String DES_STR = "FZV1D&tr"; public static final String DES_STR = "FZV1D&tr";
public static final Integer SERVER_PORT = 8074; public static final Integer SERVER_PORT = 28074;
public static final Integer CLIENT_PORT = 8073; public static final Integer CLIENT_PORT = 28073;
/** /**
* 设备心跳检查时间(秒) * 设备心跳检查时间(秒)
*/ */
...@@ -73,7 +73,9 @@ public final class Constant { ...@@ -73,7 +73,9 @@ public final class Constant {
*/ */
public static final String LOGIN_DEVICE_KEY = "login_device_key"; public static final String LOGIN_DEVICE_KEY = "login_device_key";
/** 基础代码版本 Z-BASE.MANAGER-S1.0.0 */ /**
* 基础代码版本 Z-BASE.MANAGER-S1.0.0
*/
public final static String BASEMANAGER_VERSION = "Z-BASE.MANAGER-S1.0.0"; public final static String BASEMANAGER_VERSION = "Z-BASE.MANAGER-S1.0.0";
/** /**
...@@ -81,6 +83,11 @@ public final class Constant { ...@@ -81,6 +83,11 @@ public final class Constant {
*/ */
public final static String PARAM_SERVER_HTTP_URL = "server_http_url"; public final static String PARAM_SERVER_HTTP_URL = "server_http_url";
/**
* 服务器http 映射外网可访问地址 php
*/
public final static String PARAM_SERVER_PHP_HTTP_URL = "server_php_http_url";
/** /**
* 短信平台url * 短信平台url
*/ */
...@@ -132,4 +139,7 @@ public final class Constant { ...@@ -132,4 +139,7 @@ public final class Constant {
*/ */
public static final Integer SITE_CODE_NUM = 4; public static final Integer SITE_CODE_NUM = 4;
public static final String MASTERHOST = "masterHost";
} }
...@@ -81,7 +81,9 @@ public class DeviceModuleDistributeController extends BaseCRUDJsonBodyMappingCon ...@@ -81,7 +81,9 @@ public class DeviceModuleDistributeController extends BaseCRUDJsonBodyMappingCon
} }
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");
//String temp=domain+"/"+homeUrl;
entity.setFilePath(UrlBuilder.of(domain).addPath(homeUrl).toString()); entity.setFilePath(UrlBuilder.of(domain).addPath(homeUrl).toString());
// entity.setFilePath(temp);
return super.viewAfter(id, model, entity, context); return super.viewAfter(id, model, entity, context);
} }
} }
\ No newline at end of file
...@@ -3,14 +3,13 @@ package com.mortals.xhx.module.product.service.impl; ...@@ -3,14 +3,13 @@ package com.mortals.xhx.module.product.service.impl;
import cn.hutool.core.net.url.UrlBuilder; import cn.hutool.core.net.url.UrlBuilder;
import cn.hutool.core.net.url.UrlPath; import cn.hutool.core.net.url.UrlPath;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.URLUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.mortals.framework.ap.GlobalSysInfo; import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.OrderCol; import com.mortals.framework.model.OrderCol;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.DateUtils; import com.mortals.framework.util.DateUtils;
import com.mortals.xhx.base.system.message.MessageService;
import com.mortals.xhx.base.system.message.impl.MessageProducer; import com.mortals.xhx.base.system.message.impl.MessageProducer;
import com.mortals.xhx.busiz.rsp.ProductVersionInfo; import com.mortals.xhx.busiz.rsp.ProductVersionInfo;
import com.mortals.xhx.common.code.LogTypeEnum; import com.mortals.xhx.common.code.LogTypeEnum;
...@@ -26,21 +25,20 @@ import com.mortals.xhx.module.device.service.DeviceLogService; ...@@ -26,21 +25,20 @@ import com.mortals.xhx.module.device.service.DeviceLogService;
import com.mortals.xhx.module.device.service.DeviceService; import com.mortals.xhx.module.device.service.DeviceService;
import com.mortals.xhx.module.platform.model.PlatformEntity; import com.mortals.xhx.module.platform.model.PlatformEntity;
import com.mortals.xhx.module.platform.service.PlatformService; import com.mortals.xhx.module.platform.service.PlatformService;
import com.mortals.xhx.module.product.dao.ProductDao;
import com.mortals.xhx.module.product.model.ProductEntity;
import com.mortals.xhx.module.product.model.ProductQuery; import com.mortals.xhx.module.product.model.ProductQuery;
import com.mortals.xhx.module.product.model.ProductVersionEntity; import com.mortals.xhx.module.product.model.ProductVersionEntity;
import com.mortals.xhx.module.product.model.ProductVersionQuery; import com.mortals.xhx.module.product.model.ProductVersionQuery;
import com.mortals.xhx.module.product.service.ProductService;
import com.mortals.xhx.module.product.service.ProductVersionService; import com.mortals.xhx.module.product.service.ProductVersionService;
import com.mortals.xhx.queue.*; import com.mortals.xhx.queue.DefaultTbQueueMsg;
import com.sun.jndi.toolkit.url.UrlUtil; import com.mortals.xhx.queue.TbQueueMsg;
import com.mortals.xhx.queue.TbQueueMsgHeaders;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.product.dao.ProductDao;
import com.mortals.xhx.module.product.model.ProductEntity;
import com.mortals.xhx.module.product.service.ProductService;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.nio.charset.Charset; import java.nio.charset.Charset;
...@@ -49,7 +47,8 @@ import java.util.Base64; ...@@ -49,7 +47,8 @@ import java.util.Base64;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import static com.mortals.xhx.common.key.Constant.*; import static com.mortals.xhx.common.key.Constant.MESSAGETYPE_UPGREAD;
import static com.mortals.xhx.common.key.Constant.PARAM_SERVER_HTTP_URL;
import static com.mortals.xhx.common.key.ErrorCode.DEVICE_VERSION_UNEXIST; import static com.mortals.xhx.common.key.ErrorCode.DEVICE_VERSION_UNEXIST;
import static com.mortals.xhx.common.key.ErrorCode.DEVICE_VERSION_UNEXIST_CONTENT; import static com.mortals.xhx.common.key.ErrorCode.DEVICE_VERSION_UNEXIST_CONTENT;
...@@ -210,6 +209,8 @@ public class ProductServiceImpl extends AbstractCRUDServiceImpl<ProductDao, Prod ...@@ -210,6 +209,8 @@ public class ProductServiceImpl extends AbstractCRUDServiceImpl<ProductDao, Prod
download = productVersionEntity.getFilePath(); download = productVersionEntity.getFilePath();
} }
String domain = GlobalSysInfo.getParamValue(PARAM_SERVER_HTTP_URL, "http://192.168.0.98:11091"); String domain = GlobalSysInfo.getParamValue(PARAM_SERVER_HTTP_URL, "http://192.168.0.98:11091");
// String temp= domain+"/"+download;
//productVersionInfo.setDownloadUrl(temp);
productVersionInfo.setDownloadUrl(UrlBuilder.of(domain).addPath(download).toString()); productVersionInfo.setDownloadUrl(UrlBuilder.of(domain).addPath(download).toString());
} }
} }
\ No newline at end of file
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