feat:添加mqtt服务

This commit is contained in:
dzc committed 2025-01-13 16:54:37 +08:00
1 parent fdf6dc8072
commit 82ed9bd2cc
26 files changed
+906 -6

No files matched your search

@@ -127,6 +127,12 @@
<version>2.1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.bsd</groupId>
<artifactId>pjcloud-mqtt-api</artifactId>
<version>5.7.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<profiles>
<profile>
@@ -1,4 +1,4 @@
package com.bsd.pjcloud.hard.common.config;
package com.bsd.pjcloud.hard.mqtt.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -16,8 +16,9 @@ import com.bsd.pjcloud.hard.api.entity.HardManagerEntity;
import com.bsd.pjcloud.hard.api.vo.HardManagerVo;
import com.bsd.pjcloud.hard.mapper.HardManagerMapper;
import com.bsd.pjcloud.hard.service.HardManagerService;
import com.bsd.pjcloud.hard.common.config.MqttConfig;
import com.bsd.pjcloud.hard.mqtt.config.MqttConfig;
import com.bsd.pjcloud.hard.utils.MqTopicUtil;
import com.bsd.pjcloud.mqtt.api.feign.RemoteMqttEventService;
import com.bsd.pjcloud.wallet.api.feign.RemoteMchService;
import com.bsd.pjcloud.wallet.api.utils.WalletDataUtil;
import com.bsd.pjcloud.wallet.api.vo.MchManageVo;
@@ -46,6 +47,7 @@ public class HardManagerServiceImpl extends ServiceImpl<HardManagerMapper, HardM
private final RemoteMchService mchService;
private final RemoteDeptService deptService;
private final RemoteMqttEventService remoteMqttEventService;
@Override
public Page<HardManagerVo> pageJoin(Page page, HardManagerDto dto) {
@@ -99,6 +101,8 @@ public class HardManagerServiceImpl extends ServiceImpl<HardManagerMapper, HardM
throw new RuntimeException("设备不存在");
}
baseMapper.updateById(dto);
// 更新mq
remoteMqttEventService.sendConfigChangeMsg(detail.getDeptId());
}
@Override