feat: 二阶段

This commit is contained in:
2026-07-15 17:38:02 +08:00
parent d884aa36ff
commit bb406cd354
28 changed files with 1076 additions and 79 deletions

View File

@@ -0,0 +1,6 @@
package demo.mq;
public final class CapitalMqConstants {
public static final String TOPIC = "capital-topic";
public static final String TAG_WALLET_DEDUCT = "WALLET_DEDUCT";
}

View File

@@ -0,0 +1,11 @@
package demo.mq;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
public class WalletDeductProducer {
private RocketMQTemplate rocketMQTemplate;
public void send(WalletDeductReq req) {
rocketMQTemplate.syncSend(CapitalMqConstants.TOPIC + ":" + CapitalMqConstants.TAG_WALLET_DEDUCT, req);
}
}

View File

@@ -0,0 +1,6 @@
package demo.mq;
public class WalletDeductReq {
private String walletId;
private Long amount;
}

View File

@@ -0,0 +1,7 @@
package demo.mq;
public class WalletDeductReq {
private String walletId;
private Long amount;
private String remark;
}