diff --git a/data-bus/pom.xml b/data-bus/pom.xml
deleted file mode 100644
index 0b33237..0000000
--- a/data-bus/pom.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
- 4.0.0
-
- com.dite.znpt
- parent
- 1.0.0-SNAPSHOT
-
-
- data-bus
- 1.0.0-SNAPSHOT
-
-
- 17
- 17
- UTF-8
-
-
-
-
- com.dite.znpt
- core
- 1.0.0-SNAPSHOT
-
-
- org.springframework.boot
- spring-boot-starter-amqp
-
-
-
\ No newline at end of file
diff --git a/data-bus/src/main/java/com/dite/znpt/data/bus/config/MQConfig.java b/data-bus/src/main/java/com/dite/znpt/data/bus/config/MQConfig.java
deleted file mode 100644
index b8f1fa5..0000000
--- a/data-bus/src/main/java/com/dite/znpt/data/bus/config/MQConfig.java
+++ /dev/null
@@ -1,90 +0,0 @@
-package com.dite.znpt.data.bus.config;
-
-import cn.hutool.extra.spring.SpringUtil;
-import com.dite.znpt.data.bus.entity.CommonMessage;
-import com.dite.znpt.data.bus.enums.MQTypeEnum;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.amqp.core.*;
-import org.springframework.amqp.rabbit.connection.ConnectionFactory;
-import org.springframework.amqp.rabbit.core.RabbitAdmin;
-import org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-
-@Slf4j
-@Component
-public class MQConfig {
- @Autowired
- private ConnectionFactory connectionFactory;
-
- @Bean
- public RabbitAdmin rabbitAdmin() {
- RabbitAdmin admin = new RabbitAdmin(connectionFactory);
- admin.setAutoStartup(true);
- return admin;
- }
-
- @Bean
- public TopicExchange topicExchange() {
- return new TopicExchange("data.topic.exchange");
- }
-
- @Bean
- public Declarables declarables(TopicExchange exchange) {
- List declarables = new ArrayList<>();
- declarables.add(exchange);
-
- for (MQTypeEnum typeEnum : MQTypeEnum.values()) {
- String queueName = typeEnum.getType() + ".queue";
- Queue queue = new Queue(queueName, true);
- declarables.add(queue);
- Binding binding = BindingBuilder.bind(queue)
- .to(exchange)
- .with(typeEnum.getType() + ".*");
- declarables.add(binding);
- }
-
- return new Declarables(declarables);
- }
-
- @Bean
- public List registerListeners(Declarables declarables) {
- List messageListeners = new ArrayList<>();
- for (MQTypeEnum typeEnum : MQTypeEnum.values()) {
- String queueName = typeEnum.getType() + ".queue";
-
- SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
- container.setConnectionFactory(connectionFactory);
- container.setQueueNames(queueName);
- container.setMessageListener(message -> {
- String body = new String(message.getBody());
- log.debug("队列: " + queueName + " 收到消息: " + body);
- try {
- ObjectMapper objectMapper = new ObjectMapper();
- CommonMessage> msg = objectMapper.readValue(body,
- objectMapper.getTypeFactory().constructParametricType(CommonMessage.class, typeEnum.getDto()));
- MQHandle> handle = SpringUtil.getBean(typeEnum.getImpl());
- handleMessageWithType(handle, msg);
- } catch (Exception e) {
- log.error("mq队列处理出错", e);
- }
- });
- messageListeners.add(container);
- // 启动监听
- container.start();
- }
- log.info("mq监听启动完成");
- return messageListeners;
- }
-
- @SuppressWarnings("unchecked")
- private void handleMessageWithType(MQHandle handler, CommonMessage> message) {
- handler.handle((CommonMessage) message);
- }
-
-}
diff --git a/data-bus/src/main/java/com/dite/znpt/data/bus/config/MQHandle.java b/data-bus/src/main/java/com/dite/znpt/data/bus/config/MQHandle.java
deleted file mode 100644
index fef3cec..0000000
--- a/data-bus/src/main/java/com/dite/znpt/data/bus/config/MQHandle.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.dite.znpt.data.bus.config;
-
-import com.dite.znpt.data.bus.entity.CommonMessage;
-import com.fasterxml.jackson.core.JsonProcessingException;
-
-/**
- * @author cuizhibin
- * @date 2025/04/22 17:03
- * @description mq处理接口
- */
-public interface MQHandle {
-
- /**
- * 功能描述:mq处理类
- *
- * @param msg 消息
- * @author cuizhibin
- * @date 2025/04/22 17:03
- **/
- void handle(CommonMessage msg);
-}
diff --git a/data-bus/src/main/java/com/dite/znpt/data/bus/entity/CommonMessage.java b/data-bus/src/main/java/com/dite/znpt/data/bus/entity/CommonMessage.java
deleted file mode 100644
index b400872..0000000
--- a/data-bus/src/main/java/com/dite/znpt/data/bus/entity/CommonMessage.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.dite.znpt.data.bus.entity;
-
-import com.dite.znpt.data.bus.enums.MQOperationEnum;
-import lombok.Data;
-
-@Data
-public class CommonMessage {
- private MQOperationEnum operation;
- private T payload;
-}
\ No newline at end of file
diff --git a/data-bus/src/main/java/com/dite/znpt/data/bus/entity/req/ProjectDTO.java b/data-bus/src/main/java/com/dite/znpt/data/bus/entity/req/ProjectDTO.java
deleted file mode 100644
index 627b8d3..0000000
--- a/data-bus/src/main/java/com/dite/znpt/data/bus/entity/req/ProjectDTO.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.dite.znpt.data.bus.entity.req;
-
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import java.util.List;
-
-@NoArgsConstructor
-@Data
-public class ProjectDTO {
-
-}
diff --git a/data-bus/src/main/java/com/dite/znpt/data/bus/enums/MQOperationEnum.java b/data-bus/src/main/java/com/dite/znpt/data/bus/enums/MQOperationEnum.java
deleted file mode 100644
index bdbebfe..0000000
--- a/data-bus/src/main/java/com/dite/znpt/data/bus/enums/MQOperationEnum.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.dite.znpt.data.bus.enums;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-import lombok.Getter;
-
-@Getter
-public enum MQOperationEnum {
- ADD("add", "新增"),
- UPDATE("update", "修改"),
- DEL("del", "删除"),
- ;
- private final String code;
- private final String desc;
-
- MQOperationEnum(String code, String desc) {
- this.code = code;
- this.desc = desc;
- }
-
- @JsonValue
- public String getCode() {
- return code;
- }
-
- @JsonCreator
- public static MQOperationEnum fromCode(String code) {
- for (MQOperationEnum s : values()) {
- if (s.code.equals(code)) return s;
- }
- throw new IllegalArgumentException("Unknown code: " + code);
- }
-}
diff --git a/data-bus/src/main/java/com/dite/znpt/data/bus/enums/MQTypeEnum.java b/data-bus/src/main/java/com/dite/znpt/data/bus/enums/MQTypeEnum.java
deleted file mode 100644
index 5091125..0000000
--- a/data-bus/src/main/java/com/dite/znpt/data/bus/enums/MQTypeEnum.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.dite.znpt.data.bus.enums;
-
-import com.dite.znpt.data.bus.config.MQHandle;
-import com.dite.znpt.data.bus.entity.req.ProjectDTO;
-import com.dite.znpt.data.bus.handles.ProjectHandleImpl;
-import lombok.Getter;
-
-/**
- * @author cuizhibin
- * @date 2025/04/22 17:05
- * @description mq类型枚举
- */
-@Getter
-public enum MQTypeEnum {
- PROJECT("project", "项目", ProjectHandleImpl.class, ProjectDTO.class),
- CREW("crew", "机组", ProjectHandleImpl.class, ProjectDTO.class),
- PARTS("parts", "部件", ProjectHandleImpl.class, ProjectDTO.class),
- ;
-
- private final String type;
- private final String desc;
- private final Class extends MQHandle>> impl;
- private final Class> dto;
-
- MQTypeEnum(String type, String desc, Class extends MQHandle>> impl, Class> dto) {
- this.type = type;
- this.desc = desc;
- this.impl = impl;
- this.dto = dto;
- }
-}
diff --git a/data-bus/src/main/java/com/dite/znpt/data/bus/handles/ProjectHandleImpl.java b/data-bus/src/main/java/com/dite/znpt/data/bus/handles/ProjectHandleImpl.java
deleted file mode 100644
index 63f745a..0000000
--- a/data-bus/src/main/java/com/dite/znpt/data/bus/handles/ProjectHandleImpl.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package com.dite.znpt.data.bus.handles;
-
-import com.dite.znpt.data.bus.config.MQHandle;
-import com.dite.znpt.data.bus.entity.CommonMessage;
-import com.dite.znpt.data.bus.entity.req.ProjectDTO;
-import org.springframework.stereotype.Service;
-
-/**
- * @author cuizhibin
- * @date 2025/04/22 17:11
- * @description 项目处理
- */
-@Service
-public class ProjectHandleImpl implements MQHandle {
- /**
- * 功能描述:mq处理类
- *
- * @param msg 消息
- * @author cuizhibin
- * @date 2025/04/22 17:03
- **/
- @Override
- public void handle(CommonMessage msg) {
-
- }
-}
diff --git a/pom.xml b/pom.xml
index e1ec815..0f34b69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,6 @@
core
sip
web
- data-bus
pom