mirror of
https://github.com/abcv7/sfbx-cloud.git
synced 2026-08-16 11:47:00 +00:00
功能:在保险、规则、交易、积分和短信模块中实现初始功能和基础组件。
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>sfbx-framework</artifactId>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<!--基础模块-mybatis-plus支持-->
|
||||
<artifactId>framework-rabbitmq</artifactId>
|
||||
<name>framework-rabbitmq</name>
|
||||
<!-- FIXME change it to the project's website -->
|
||||
<url>http://www.example.com</url>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>framework-commons</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.itheima.sfbx.framework.rabbitmq.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
/**
|
||||
* @Description:Rabbit消息封装
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MqMessage implements Serializable {
|
||||
|
||||
/**消息id**/
|
||||
private Long id;
|
||||
|
||||
/**标题**/
|
||||
private String title;
|
||||
|
||||
/**消息内容**/
|
||||
private String content;
|
||||
|
||||
/**业务类型**/
|
||||
private String messageType;
|
||||
|
||||
/**产生时间**/
|
||||
private Timestamp produceTime;
|
||||
|
||||
/**发送人**/
|
||||
private String sender;
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.itheima.sfbx.framework.rabbitmq.sink;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.Input;
|
||||
import org.springframework.messaging.SubscribableChannel;
|
||||
|
||||
/**
|
||||
* @ClassName LogSink.java
|
||||
* @Description 日志接收
|
||||
*/
|
||||
public interface FileSink {
|
||||
|
||||
public static String FILE_INPUT="file-input";
|
||||
|
||||
@Input(FILE_INPUT)
|
||||
SubscribableChannel fileInput();
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.itheima.sfbx.framework.rabbitmq.sink;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.Input;
|
||||
import org.springframework.messaging.SubscribableChannel;
|
||||
|
||||
/**
|
||||
* @ClassName LogSink.java
|
||||
* @Description 日志接收
|
||||
*/
|
||||
public interface LogSink {
|
||||
|
||||
public static String LOG_INPUT="log-input";
|
||||
|
||||
@Input(LOG_INPUT)
|
||||
SubscribableChannel logInput();
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.itheima.sfbx.framework.rabbitmq.sink;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.Input;
|
||||
import org.springframework.messaging.SubscribableChannel;
|
||||
|
||||
/**
|
||||
* @ClassName SmsSink.java
|
||||
* @Description 短信接受
|
||||
*/
|
||||
public interface SmsSink {
|
||||
|
||||
public static String SMS_INPUT="sms-input";
|
||||
|
||||
@Input(SMS_INPUT)
|
||||
SubscribableChannel smsInput();
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.itheima.sfbx.framework.rabbitmq.sink;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.Input;
|
||||
import org.springframework.messaging.SubscribableChannel;
|
||||
|
||||
/**
|
||||
* @ClassName SmsSink.java
|
||||
* @Description 交易结果接受
|
||||
*/
|
||||
public interface TradeSink {
|
||||
|
||||
public static String TRADE_INPUT="trade-input";
|
||||
|
||||
@Input(TRADE_INPUT)
|
||||
SubscribableChannel tradeInput();
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.itheima.sfbx.framework.rabbitmq.sink;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.Input;
|
||||
import org.springframework.messaging.SubscribableChannel;
|
||||
|
||||
/**
|
||||
* @ClassName WarrantySink.java
|
||||
* @Description 合同延迟接受
|
||||
*/
|
||||
public interface WarrantySink {
|
||||
|
||||
public static String WARRANTY_INPUT="warranty-input";
|
||||
|
||||
@Input(WARRANTY_INPUT)
|
||||
SubscribableChannel warrantyInput();
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.itheima.sfbx.framework.rabbitmq.source;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.Output;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
|
||||
/**
|
||||
* @ClassName FileSource.java
|
||||
* @Description 文件消息队列的发送者
|
||||
*/
|
||||
public interface FileSource {
|
||||
|
||||
public static String FILE_OUTPUT = "file-output";
|
||||
|
||||
@Output(FILE_OUTPUT)
|
||||
MessageChannel fileOutput();
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.itheima.sfbx.framework.rabbitmq.source;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.Output;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
|
||||
/**
|
||||
* @ClassName LogSource.java
|
||||
* @Description 日志发送
|
||||
*/
|
||||
public interface LogSource {
|
||||
|
||||
public static String LOG_OUTPUT = "log-output";
|
||||
|
||||
@Output(LOG_OUTPUT)
|
||||
MessageChannel logOutput();
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.itheima.sfbx.framework.rabbitmq.source;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.Output;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
|
||||
/**
|
||||
* @ClassName SmsSource.java
|
||||
* @Description 短信发送
|
||||
*/
|
||||
public interface SmsSource {
|
||||
|
||||
public static String SMS_OUTPUT = "sms-output";
|
||||
|
||||
@Output(SMS_OUTPUT)
|
||||
MessageChannel smsOutput();
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.itheima.sfbx.framework.rabbitmq.source;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.Output;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
|
||||
/**
|
||||
* @ClassName SmsSource.java
|
||||
* @Description 交易结果发送
|
||||
*/
|
||||
public interface TradeSource {
|
||||
|
||||
public static String TRADE_OUTPUT = "trade-output";
|
||||
|
||||
@Output(TRADE_OUTPUT)
|
||||
MessageChannel tradeOutput();
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.itheima.sfbx.framework.rabbitmq.source;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.Output;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
|
||||
/**
|
||||
* @ClassName WarrantySource.java
|
||||
* @Description 合同延迟发送
|
||||
*/
|
||||
public interface WarrantySource {
|
||||
|
||||
public static String WARRANTY_OUTPUT = "warranty-output";
|
||||
|
||||
@Output(WARRANTY_OUTPUT)
|
||||
MessageChannel warrantyOutput();
|
||||
}
|
||||
Reference in New Issue
Block a user