From 444b1808d73d21f9df361e64f44381b910947792 Mon Sep 17 00:00:00 2001 From: yangys <y_ys79@sina.com> Date: 星期五, 27 九月 2024 11:05:08 +0800 Subject: [PATCH] 去掉tdedgine,去掉一部分rocketmq,去掉dmplog模块 --- smart-man-boot/src/main/java/com/qianwen/smartman/modules/cps/message/producer/InsertWorkstationProducer.java | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/cps/message/producer/InsertWorkstationProducer.java b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/cps/message/producer/InsertWorkstationProducer.java index b50cbfb..bf9cb5d 100644 --- a/smart-man-boot/src/main/java/com/qianwen/smartman/modules/cps/message/producer/InsertWorkstationProducer.java +++ b/smart-man-boot/src/main/java/com/qianwen/smartman/modules/cps/message/producer/InsertWorkstationProducer.java @@ -1,20 +1,27 @@ package com.qianwen.smartman.modules.cps.message.producer; -import org.apache.rocketmq.spring.core.RocketMQTemplate; +//import org.apache.rocketmq.spring.core.RocketMQTemplate; import com.qianwen.smartman.common.constant.WorkstationConstant; +import com.qianwen.smartman.common.mqtt.MqttMessageSender; import com.qianwen.smartman.modules.cps.dto.WorkstationCreateMessageDTO; -import org.springframework.messaging.support.MessageBuilder; + +import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.messaging.support.MessageBuilder; import org.springframework.stereotype.Component; @Component public class InsertWorkstationProducer { - private final RocketMQTemplate rocketMQTemplate; - + //private final RocketMQTemplate rocketMQTemplate; + @Autowired + private MqttMessageSender mqttMsgSender; + /* public InsertWorkstationProducer(final RocketMQTemplate rocketMQTemplate) { this.rocketMQTemplate = rocketMQTemplate; - } + }*/ - public void sendInsertWorkstationMessage(WorkstationCreateMessageDTO dto) { - this.rocketMQTemplate.syncSend(WorkstationConstant.WORKSTATION_CREATE_TOPIC, MessageBuilder.withPayload(dto).build()); + public void sendInsertWorkstationMessage(Long workstationId) { + //this.rocketMQTemplate.syncSend(WorkstationConstant.WORKSTATION_CREATE_TOPIC, MessageBuilder.withPayload(dto).build()); + + mqttMsgSender.sendMessage(WorkstationConstant.WORKSTATION_CREATE_TOPIC, String.valueOf(workstationId)); } } -- Gitblit v1.9.3