From 3916de9410192ea8728ebd15c124585d4514825c Mon Sep 17 00:00:00 2001
From: Hentua <wangdoubleone@gmail.com>
Date: Mon, 24 Apr 2023 00:53:29 +0800
Subject: [PATCH] fix
---
src/main/java/cc/mrbird/febs/rabbit/consumer/AgentConsumer.java | 26 ++++++--------------------
1 files changed, 6 insertions(+), 20 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/rabbit/consumer/AgentConsumer.java b/src/main/java/cc/mrbird/febs/rabbit/consumer/AgentConsumer.java
index 46c50a1..dfd775b 100644
--- a/src/main/java/cc/mrbird/febs/rabbit/consumer/AgentConsumer.java
+++ b/src/main/java/cc/mrbird/febs/rabbit/consumer/AgentConsumer.java
@@ -19,7 +19,7 @@
* @date 2021-09-25
**/
@Slf4j
-@Component
+//@Component
public class AgentConsumer {
@Autowired
@@ -29,12 +29,7 @@
@Autowired
private IMemberProfitService memberProfitService;
- @RabbitListener(queues = QueueConstants.QUEUE_DEFAULT)
- public void agentReturn(Message message, Channel channel) {
- log.info("消费者:{}", new String(message.getBody()));
- }
-
- @RabbitListener(queues = "queue_order_delay")
+ @RabbitListener(queues = "meye_queue_order_delay")
public void orderCancelDelay(String id) {
try {
orderInfoService.autoCancelOrder(Long.parseLong(id));
@@ -45,21 +40,11 @@
@RabbitListener(queues = QueueConstants.AGENT_AUTO_LEVEL_UP)
public void agentAutoLevelUp(String id) {
- log.info("收到代理自动升级消息:{}", id);
+ log.info("收到合伙人自动升级消息:{}", id);
try {
agentService.autoUpAgentLevel(Long.parseLong(id));
} catch (Exception e) {
- log.error("代理自动升级异常", e);
- }
- }
-
- @RabbitListener(queues = QueueConstants.AGENT_RETURN_MONEY)
- public void agentReturnMoney(String orderId) {
- log.info("收到返利消息:{}", orderId);
- try {
- agentService.returnMoneyToAgent(Long.parseLong(orderId));
- } catch (Exception e) {
- log.error("返利异常", e);
+ log.error("合伙人自动升级异常", e);
}
}
@@ -67,9 +52,10 @@
public void orderReturnMoney(String orderId) {
log.info("收到订单返利消息:{}", orderId);
try {
- memberProfitService.dynamicProfit(Long.parseLong(orderId));
+ memberProfitService.directProfit(Long.parseLong(orderId));
} catch (Exception e) {
log.error("订单返利异常:", e);
}
}
+
}
--
Gitblit v1.9.1