Commit fafa968d by YG8999

mqtt服务迁移system模块下面

parent 9d66a9a5
......@@ -17,7 +17,7 @@ import share.common.core.controller.BaseController;
import share.common.core.domain.AjaxResult;
import share.common.enums.BusinessType;
import share.common.utils.SecurityUtils;
import share.framework.mqtt.MqttGatewayComponent;
import share.system.mqtt.MqttGatewayComponent;
import share.system.domain.Device;
import share.system.domain.vo.DeviceParamVo;
import share.system.domain.vo.MqttxVo;
......
......@@ -60,21 +60,6 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-integration</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-stream</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-mqtt</artifactId>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.16</version>
......
......@@ -128,6 +128,21 @@
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-integration</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-stream</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-mqtt</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package share.framework.mqtt;
package share.system.mqtt;
import org.springframework.integration.annotation.MessagingGateway;
......
package share.framework.mqtt;
package share.system.mqtt;
import cn.hutool.core.util.ObjectUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.integration.mqtt.support.MqttHeaders;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHandler;
......
package share.framework.mqtt;
package share.system.mqtt;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ObjectUtil;
......
package share.framework.mqtt;
package share.system.mqtt;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
......
package share.framework.mqtt;
package share.system.mqtt;
import org.springframework.integration.mqtt.core.MqttPahoClientFactory;
import org.springframework.integration.mqtt.outbound.MqttPahoMessageHandler;
......
package share.system.service;
import share.system.domain.vo.DeviceParamVo;
/**
* @className: share.system.service.DeviceOpService
* @description: 设备操作接口
* @author: lwj
* @create: 2023-11-09 13:58
*/
public interface DeviceOpService {
/**
* 小程序订单开门
* @param deviceParam
*/
void openDoor(DeviceParamVo deviceParam);
/**
* 小程序订单开门
* @param roomId 房间id
* @param phone 操作用户
*/
void openDoor(Long roomId, String phone);
}
package share.web.service;
package share.system.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import share.common.enums.DeviceType;
import share.framework.mqtt.MqttGatewayComponent;
import share.system.mqtt.MqttGatewayComponent;
import share.system.domain.Device;
import share.system.domain.SRoom;
import share.system.domain.vo.DeviceParamVo;
......@@ -11,18 +11,19 @@ import share.system.domain.vo.MqttxVo;
import share.system.mapper.DeviceMapper;
import share.system.mapper.SRoomMapper;
import share.system.service.DeviceLogService;
import share.system.service.DeviceOpService;
import share.system.service.MqttxService;
import java.util.List;
/**
* @className: share.web.service.DeviceOpService
* @className: share.system.service.impl.DeviceOpService
* @description: 设备操作接口
* @author: lwj
* @create: 2023-11-09 10:38
*/
@Service
public class DeviceOpService {
public class DeviceOpServiceImpl implements DeviceOpService {
@Autowired
private MqttGatewayComponent mqttGatewayComponent;
......
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