diff --git a/common-lib/pom.xml b/common-lib/pom.xml index 8754b447851d13cfca06e52091bc1e3773af995b..4c9517b8c506fd6d7ea9f097cd189451529098eb 100644 --- a/common-lib/pom.xml +++ b/common-lib/pom.xml @@ -79,11 +79,6 @@ <artifactId>guava</artifactId> </dependency> - <dependency> - <groupId>io.swagger</groupId> - <artifactId>swagger-annotations</artifactId> - </dependency> - <dependency> <groupId>com.google.zxing</groupId> <artifactId>javase</artifactId> diff --git a/device-manager/pom.xml b/device-manager/pom.xml index b0bc3dc9b5331c9094d42494479c1da4919a9308..d31a53f9d1c7ac4dbb6202a46ee50afa952d91d0 100644 --- a/device-manager/pom.xml +++ b/device-manager/pom.xml @@ -62,11 +62,11 @@ <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt</artifactId> </dependency> - <dependency> +<!-- <dependency> <groupId>p6spy</groupId> <artifactId>p6spy</artifactId> <version>3.9.1</version> - </dependency> + </dependency>--> <dependency> <groupId>junit</groupId> diff --git a/device-manager/src/main/java/com/mortals/xhx/base/framework/listener/CustomerKeyExpirationListener.java b/device-manager/src/main/java/com/mortals/xhx/base/framework/listener/CustomerKeyExpirationListener.java index ec37a752ff7fe4e2b4fbde4a3e92610e3e7a2700..170377e8b8a5aa829960a5d82a3a50b7546e5481 100644 --- a/device-manager/src/main/java/com/mortals/xhx/base/framework/listener/CustomerKeyExpirationListener.java +++ b/device-manager/src/main/java/com/mortals/xhx/base/framework/listener/CustomerKeyExpirationListener.java @@ -1,9 +1,23 @@ package com.mortals.xhx.base.framework.listener; +import cn.hutool.core.util.StrUtil; +import com.mortals.xhx.common.code.DeviceOnlineStatusEnum; +import com.mortals.xhx.common.code.DeviceStatusEnum; +import com.mortals.xhx.common.key.RedisKey; +import com.mortals.xhx.module.device.model.DeviceEntity; +import com.mortals.xhx.module.device.service.DeviceService; +import com.mortals.xhx.module.platform.model.PlatformEntity; +import com.mortals.xhx.module.platform.service.PlatformService; +import com.mortals.xhx.module.product.model.ProductEntity; +import com.mortals.xhx.module.product.service.ProductService; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.connection.Message; import org.springframework.data.redis.connection.MessageListener; import org.springframework.stereotype.Component; +import org.springframework.util.ObjectUtils; + +import java.util.Date; /** * @author: zxfei @@ -13,9 +27,39 @@ import org.springframework.stereotype.Component; @Slf4j @Component public class CustomerKeyExpirationListener implements MessageListener { + + @Autowired + private DeviceService deviceService; + @Autowired + private ProductService productService; + @Autowired + private PlatformService platformService; + @Override public void onMessage(Message message, byte[] bytes) { String key = message.toString(); + String subStr = StrUtil.removePrefix(key, RedisKey.KEY_DEVICE_ONLINE_CACHE); + if(!subStr.equals(key)){ + DeviceEntity deviceEntity = deviceService.getExtCache(subStr); + if (!ObjectUtils.isEmpty(deviceEntity)) { + if (deviceEntity.getDeviceOnlineStatus() == DeviceOnlineStatusEnum.鍦ㄧ嚎.getValue()) { + deviceEntity.setOfflineTime(new Date()); + deviceEntity.setDeviceOnlineStatus(DeviceOnlineStatusEnum.绂荤嚎.getValue()); + deviceService.update(deviceEntity); + + PlatformEntity platformEntity = platformService.get(deviceEntity.getPlatformId()); + ProductEntity productEntity = productService.get(deviceEntity.getProductId()); + if (!ObjectUtils.isEmpty(platformEntity) && !ObjectUtils.isEmpty(productEntity)) { + //閫氱煡绗笁鏂瑰钩鍙� + deviceService.sendThirdParty(deviceEntity, productEntity, platformEntity, DeviceStatusEnum.OFFLINE); + } + } + + // TODO: 2022/6/23 鍛婅淇℃伅淇濆瓨涓庡彂閫� + } + } + + log.info("鐩戝惉鍒発ey:" + key + "杩囨湡"); } } \ No newline at end of file diff --git a/device-manager/src/main/java/com/mortals/xhx/busiz/BaseReq.java b/device-manager/src/main/java/com/mortals/xhx/busiz/BaseReq.java index 34a4e7d7b6b9fc0eca9278ec242275675c94c5a5..48e35fa2849d48d0d27a241faef4e74744f6c648 100644 --- a/device-manager/src/main/java/com/mortals/xhx/busiz/BaseReq.java +++ b/device-manager/src/main/java/com/mortals/xhx/busiz/BaseReq.java @@ -3,7 +3,6 @@ package com.mortals.xhx.busiz; import com.mortals.xhx.common.code.CommentTypeEnum; import com.mortals.xhx.common.code.ProcessStatusEnum; -import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -20,44 +19,36 @@ public abstract class BaseReq implements Serializable { /** * 浠诲姟id 蹇呭~ */ - @ApiModelProperty(value = "浠诲姟id", required = true) private String taskId; /** * 娴佺▼瀹炰緥鐨刬d */ - @ApiModelProperty(value = "娴佺▼瀹炰緥鐨刬d", required = true) private String processInstanceId; /** * 鑺傜偣id 閫夊~ */ - @ApiModelProperty(value = "鑺傜偣id") private String activityId; /** * 鑺傜偣鍚嶇О 閫夊~ */ - @ApiModelProperty(value = "鑺傜偣鍚嶇О") private String activityName; /** * 娴佺▼瀹炰緥鐘舵€� 蹇呭~ */ - @ApiModelProperty(value = "娴佺▼瀹炰緥鐘舵€�", required = true) private ProcessStatusEnum processStatusEnum; /**********************瀹℃壒鎰忚鐨勫弬鏁�**********************/ /** * 鎿嶄綔浜篶ode 蹇呭~ */ - @ApiModelProperty(value = "鎿嶄綔浜篶ode", required = true) private String userCode; /** * 瀹℃壒鎰忚 蹇呭~ */ - @ApiModelProperty(value = "瀹℃壒鎰忚", required = true) private String message; /** * 瀹℃壒鎰忚绫诲瀷 蹇呭~ */ - @ApiModelProperty(value = "瀹℃壒鎰忚绫诲瀷", required = true) private CommentTypeEnum commentTypeEnum; diff --git a/device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java b/device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java index e2544df155fd1caa89ee6697249d8e626d236cb7..c3ceb6d3654571695a6fc38c1e0e1ea8ab414a29 100644 --- a/device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java +++ b/device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java @@ -475,7 +475,15 @@ public class DeviceApiController { } DeviceEntity deviceEntity = deviceService.getExtCache(req.getDeviceCode()); if (ObjectUtils.isEmpty(deviceEntity)) { - throw new AppException("褰撳墠璁惧涓嶅瓨鍦紒"); + //鍒濆鍖栨柊澧炲熀纭€璁惧锛屽悗缁湪绾垮畬鍠勪俊鎭悗鍐嶈娉ㄥ唽娣诲姞 + deviceEntity = new DeviceEntity(); + deviceEntity.initAttrValue(); + deviceEntity.setDeviceMac(req.getDeviceCode()); + deviceEntity.setDeviceCode(req.getDeviceCode()); + deviceEntity.setCreateTime(new Date()); + deviceEntity.setCreateUserId(1L); + deviceService.getDeviceDao().insert(deviceEntity); + } return deviceEntity; } diff --git a/device-manager/src/main/java/com/mortals/xhx/common/key/Constant.java b/device-manager/src/main/java/com/mortals/xhx/common/key/Constant.java index 02884447ad10c7d74014dee2fa73c62768359674..e9fbc877603d7a89fb2a15e09d8242482fa9b15c 100644 --- a/device-manager/src/main/java/com/mortals/xhx/common/key/Constant.java +++ b/device-manager/src/main/java/com/mortals/xhx/common/key/Constant.java @@ -46,6 +46,10 @@ public final class Constant { public static final Integer SERVER_PORT = 8074; public static final Integer CLIENT_PORT = 8073; + /** + * 璁惧蹇冭烦妫€鏌ユ椂闂达紙绉掞級 + */ + public static final String HEARTBEAT_TIMEOUT = "heartbeat_timeout"; /** diff --git a/device-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java b/device-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java index 8efa5680ce11d2a36e084b0190f5204e0f7b8100..35168e759e50525f748cf98762571ef57d4eb5c2 100644 --- a/device-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java +++ b/device-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java @@ -6,8 +6,12 @@ package com.mortals.xhx.common.key; public class RedisKey { /** - * 鐧诲綍 cookies key + * 鐧诲綍 key */ public static final String KEY_MENU_CACHE = "iot:base:MenuCacheKey:"; + /** + * 璁惧蹇冭烦涓婃姤 + */ + public static final String KEY_DEVICE_ONLINE_CACHE = "device:online:"; } diff --git a/device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceMsgComsumerStartedService.java b/device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceMsgComsumerStartedService.java index 62d865cac596f79b6e74250ea0a7fbf7fe8d3024..e782df6f6cba4c2abf6bac93f5fc941fc2656da5 100644 --- a/device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceMsgComsumerStartedService.java +++ b/device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceMsgComsumerStartedService.java @@ -2,12 +2,15 @@ package com.mortals.xhx.daemon.applicationservice; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.mortals.framework.ap.GlobalSysInfo; +import com.mortals.framework.service.ICacheService; import com.mortals.framework.springcloud.service.IApplicationStartedService; import com.mortals.xhx.base.framework.ws.message.SendToAllRequest; import com.mortals.xhx.base.framework.ws.util.WebSocketUtil; import com.mortals.xhx.busiz.req.DeviceReq; import com.mortals.xhx.common.code.*; import com.mortals.xhx.common.key.Constant; +import com.mortals.xhx.common.key.RedisKey; import com.mortals.xhx.common.utils.SendTask; import com.mortals.xhx.common.utils.SendTaskThreadPool; import com.mortals.xhx.module.device.model.DeviceEntity; @@ -39,6 +42,8 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; +import static com.mortals.xhx.common.model.MessageHeader.MESSAGETYPE; + @Component @Slf4j @@ -56,6 +61,8 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi private PlatformService platformService; @Autowired private SendTaskThreadPool sendTaskThreadPool; + @Autowired + private ICacheService cacheService; protected volatile ExecutorService consumersExecutor; @@ -69,8 +76,8 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi if (!ObjectUtils.isEmpty(mainConsumer)) { //璁㈤槄鎵€鏈夊凡鍑犲揩娲昏澶� Set<TopicPartitionInfo> topicPartitionInfoSet = deviceService.find(new DeviceQuery().active(ActiveEnum.宸叉縺娲�.getValue()).status(StatusEnum.鍚敤.getValue())).stream() - .filter(f->!ObjectUtils.isEmpty(platformService.get(f.getPlatformId()))) - .filter(f->!ObjectUtils.isEmpty(productService.get(f.getProductId()))) + .filter(f -> !ObjectUtils.isEmpty(platformService.get(f.getPlatformId()))) + .filter(f -> !ObjectUtils.isEmpty(productService.get(f.getProductId()))) .map(item -> { PlatformEntity platformEntity = platformService.get(item.getPlatformId()); ProductEntity productEntity = productService.get(item.getProductId()); @@ -86,7 +93,6 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi int waitTime = 1000; while (!stopped) { try { - List<TbQueueMsg> messageList = new ArrayList(32); TbQueueMsg message; for (int i = 0; i < 32; i++) { @@ -101,7 +107,6 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi break; } } - if (messageList.size() > 0) { log.debug("poll messageQueue messages: {}", JSON.toJSONString(messageList)); //寮傛娑堟伅鍒嗗彂 @@ -158,10 +163,11 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi boolean bool = false; DeviceEntity deviceEntity = deviceService.getExtCache(deviceReq.getDeviceCode()); if (!ObjectUtils.isEmpty(deviceEntity)) { + cacheService.hsetnx(RedisKey.KEY_DEVICE_ONLINE_CACHE + deviceEntity.getDeviceCode(), "", GlobalSysInfo.getParamIntValue(Constant.HEARTBEAT_TIMEOUT, 180)); if (deviceEntity.getDeviceOnlineStatus() == DeviceOnlineStatusEnum.绂荤嚎.getValue()) { bool = true; } - if(deviceEntity.getDeviceOnlineStatus()==DeviceOnlineStatusEnum.鍦ㄧ嚎.getValue()){ + if (deviceEntity.getDeviceOnlineStatus() == DeviceOnlineStatusEnum.鍦ㄧ嚎.getValue()) { deviceEntity.setOnlineTime(new Date()); deviceEntity.setDeviceOnlineStatus(DeviceOnlineStatusEnum.鍦ㄧ嚎.getValue()); deviceService.update(deviceEntity); @@ -173,31 +179,26 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi deviceService.sendThirdParty(deviceEntity, productEntity, platformEntity, DeviceStatusEnum.OFFLINE); } } - - - - DeviceLogEntity deviceLogEntity = new DeviceLogEntity(); - deviceLogEntity.initAttrValue(); - deviceLogEntity.setDeviceId(deviceEntity.getId()); - deviceLogEntity.setDeviceName(deviceEntity.getDeviceName()); - deviceLogEntity.setDeviceNum(deviceEntity.getDeviceCode()); - deviceLogEntity.setContent(JSONObject.toJSONString(deviceReq)); - deviceLogEntity.setLogType(LogTypeEnum.涓婃姤浜嬩欢.getValue()); - deviceLogEntity.setCreateUserId(1L); - deviceLogEntity.setCreateTime(new Date()); - deviceLogService.save(deviceLogEntity); - + if (!Constant.MESSAGETYPE_HEARTBEAT.equals(queueMsg.getHeaders().getData().get(MESSAGETYPE))) { + DeviceLogEntity deviceLogEntity = new DeviceLogEntity(); + deviceLogEntity.initAttrValue(); + deviceLogEntity.setDeviceId(deviceEntity.getId()); + deviceLogEntity.setDeviceName(deviceEntity.getDeviceName()); + deviceLogEntity.setDeviceNum(deviceEntity.getDeviceCode()); + deviceLogEntity.setContent(JSONObject.toJSONString(deviceReq)); + deviceLogEntity.setLogType(LogTypeEnum.涓婃姤浜嬩欢.getValue()); + deviceLogEntity.setCreateUserId(1L); + deviceLogEntity.setCreateTime(new Date()); + deviceLogService.save(deviceLogEntity); + } //鑾峰彇exchange, PlatformEntity platformEntity = platformService.get(deviceEntity.getPlatformId()); if (!ObjectUtils.isEmpty(platformEntity) && platformEntity.getSendSwitch() == YesNoEnum.YES.getValue()) { if (platformEntity.getSendMsgType() == SendMsgTypeEnum.http.getValue() && !ObjectUtils.isEmpty(platformEntity.getSendUrl())) { //http鏂瑰紡 //閫氳繃绾跨▼姹犺繘琛屽彂閫佹秷鎭� - - - - SendTask sendTask = new SendTask(platformEntity.getSendUrl(), new String(queueMsg.getData())); - sendTaskThreadPool.execute(sendTask); + SendTask sendTask = new SendTask(platformEntity.getSendUrl(), new String(queueMsg.getData())); + sendTaskThreadPool.execute(sendTask); } } // if (bool) { diff --git a/device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DemoStartService.java b/device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceStartService.java similarity index 70% rename from device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DemoStartService.java rename to device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceStartService.java index 154780b4bb012100fdd03c455b665e31001388de..8feaca38509b7d8477b76db439f7a09b87284e9f 100644 --- a/device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DemoStartService.java +++ b/device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceStartService.java @@ -1,12 +1,15 @@ package com.mortals.xhx.daemon.applicationservice; import com.mortals.framework.service.ICacheService; +import com.mortals.xhx.base.framework.listener.CustomerKeyExpirationListener; import com.mortals.xhx.common.utils.SendTaskThreadPool; import lombok.extern.slf4j.Slf4j; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.checkerframework.checker.units.qual.A; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.connection.Message; +import org.springframework.data.redis.connection.MessageListener; import org.springframework.stereotype.Component; import com.mortals.framework.springcloud.service.IApplicationService; @@ -15,7 +18,7 @@ import java.time.Duration; @Component @Slf4j -public class DemoStartService implements IApplicationService { +public class DeviceStartService implements IApplicationService { @Autowired private SendTaskThreadPool sendTaskThreadPool; @@ -26,8 +29,10 @@ public class DemoStartService implements IApplicationService { public void start() { log.info("鍒濆鍖栧彂閫佺嚎绋嬫暟閲�"); sendTaskThreadPool.init(20); - - cacheService.setnx("test-expire","111", 100); + log.info("鍒濆鍖栬繃鏈焝ey鐩戝惉浜嬩欢"); + for(int i=0;i<100;i++){ + cacheService.setnx("test-expire"+i,"111", 10+i); + } log.info("寮€濮嬫湇鍔�..[閰嶇疆宸插姞杞藉畬鎴愶紝浣嗛儴鍒嗘鏋惰繕鏈垵濮嬪寲锛屾瘮濡傦細Kafka]"); } diff --git a/device-manager/src/main/java/com/mortals/xhx/daemon/task/DeviceStatTaskImpl.java b/device-manager/src/main/java/com/mortals/xhx/daemon/task/DeviceStatTaskImpl.java index d9030d1950d8196c252a4cd237172b42d14ce538..cd5fdf54d909d9db6cb6965574d14f5bfb93e9f6 100644 --- a/device-manager/src/main/java/com/mortals/xhx/daemon/task/DeviceStatTaskImpl.java +++ b/device-manager/src/main/java/com/mortals/xhx/daemon/task/DeviceStatTaskImpl.java @@ -55,8 +55,8 @@ public class DeviceStatTaskImpl implements ITaskExcuteService { @Override public void excuteTask(ITask task) throws AppException { log.debug("璁惧鐘舵€佺粺璁★紝寮€濮嬫墽琛�"); - doDeviceUpOrDown(); - doDeviceLogDel(); + //doDeviceUpOrDown(); + //doDeviceLogDel(); log.debug("璁惧鐘舵€佺粺璁★紝缁撴潫鎵ц"); } diff --git a/device-manager/src/main/java/com/mortals/xhx/module/device/service/DeviceService.java b/device-manager/src/main/java/com/mortals/xhx/module/device/service/DeviceService.java index ce034a242de5fdc8e06186ce49c2074d1a97eb2d..2f7c89eb859901c45b5372096101e55a88c23186 100644 --- a/device-manager/src/main/java/com/mortals/xhx/module/device/service/DeviceService.java +++ b/device-manager/src/main/java/com/mortals/xhx/module/device/service/DeviceService.java @@ -3,6 +3,7 @@ import com.mortals.framework.model.Context; import com.mortals.framework.service.ICRUDCacheService; import com.mortals.xhx.busiz.rsp.ApiResp; import com.mortals.xhx.common.code.DeviceStatusEnum; +import com.mortals.xhx.module.device.dao.DeviceDao; import com.mortals.xhx.module.device.model.DeviceEntity; import com.mortals.xhx.module.platform.model.PlatformEntity; import com.mortals.xhx.module.product.model.ProductEntity; @@ -44,5 +45,7 @@ public interface DeviceService extends ICRUDCacheService<DeviceEntity,Long>{ void sendThirdParty(DeviceEntity entity, ProductEntity productEntity, PlatformEntity platformEntity, DeviceStatusEnum update); + DeviceDao getDeviceDao(); + } \ No newline at end of file diff --git a/device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java b/device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java index 8cce6596d391e3d504222849fe11c51450ad7bd3..130270f2ec1f773a9234740abf80205c6e262c2c 100644 --- a/device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java +++ b/device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java @@ -66,6 +66,7 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D throw new AppException("鎵€灞炰骇鍝佷笉鑳戒负绌猴紒"); } + super.validData(entity, context); } @@ -196,6 +197,11 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D } } + @Override + public DeviceDao getDeviceDao() { + return this.getDao(); + } + @Override protected void removeBefore(Long[] ids, Context context) throws AppException { Arrays.asList(ids).stream().forEach(id -> { diff --git a/doc/api.md b/doc/api.md index 97d3edadb55449ae0d8f66436d599adc1aab939c..54a2bfeda15a1120cc77caade455a30d802a89d8 100644 --- a/doc/api.md +++ b/doc/api.md @@ -26,7 +26,7 @@ arrays|鏁扮粍绫诲瀷|[{"name":"zhang3"},{"name":"zhang2"}] **鍐呭绫诲瀷:** application/json;charset=utf-8 -**绠€瑕佹弿杩�:** 璁惧婵€娲� +**绠€瑕佹弿杩�:** 鏈嶅姟绔湴鍧€鑾峰彇 **骞挎挱鍙傛暟:** @@ -71,7 +71,7 @@ data|String|鏁版嵁瀵硅薄|- **鍐呭绫诲瀷:** application/json;charset=utf-8 -**绠€瑕佹弿杩�:** 璁惧娉ㄥ唽锛屾垚鍔熻繑鍥炲搷搴攔abbmit杩炴帴鍙傛暟 +**绠€瑕佹弿杩�:** 璁惧娉ㄥ唽锛屾垚鍔熻繑鍥炲搷搴攔abbmit杩炴帴鍙傛暟,濡傛湭鎵惧埌璇ヨ澶囷紝绯荤粺浼氭牴鎹澶囩爜鍒涘缓鏂拌澶� **璇锋眰鍙傛暟:** diff --git a/pom.xml b/pom.xml index 26eb3bd47436cf0e1fe2e647db5ba490c83664b1..8c45ede4c6112808a5b0cd4d1ff611706b2a46f2 100644 --- a/pom.xml +++ b/pom.xml @@ -36,11 +36,11 @@ <![CDATA[jdbc:mysql://localhost: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>12345678</profiles.datasource.password> - <profiles.redis.uri>127.0.0.1</profiles.redis.uri> + <profiles.redis.uri>192.168.0.98</profiles.redis.uri> <profiles.redis.port>6379</profiles.redis.port> <profiles.redis.username></profiles.redis.username> <profiles.redis.password></profiles.redis.password> - <profiles.redis.database>7</profiles.redis.database> + <profiles.redis.database>1</profiles.redis.database> <profiles.kafka.brokers>192.168.0.251:9092</profiles.kafka.brokers> <profiles.queue.type>rabbitmq</profiles.queue.type> <profiles.rabbitmq.host>192.168.0.98</profiles.rabbitmq.host> @@ -65,11 +65,11 @@ <![CDATA[jdbc:mysql://192.168.0.98: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>nacos@2020</profiles.datasource.password> - <profiles.redis.uri>192.168.0.252</profiles.redis.uri> + <profiles.redis.uri>192.168.0.98</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>7</profiles.redis.database> + <profiles.redis.password></profiles.redis.password> + <profiles.redis.database>2</profiles.redis.database> <profiles.kafka.brokers>192.168.0.251:9092</profiles.kafka.brokers> <profiles.rabbitmq.host>192.168.0.98</profiles.rabbitmq.host> <profiles.rabbitmq.port>5672</profiles.rabbitmq.port>