提交 506c8da4 作者: xiaowang

充值成功消息订阅

上级 e1af8a78
package com.mmc.iuav.user.mq; package com.mmc.iuav.user.mq;
import com.mmc.iuav.user.mq.constant.RabbitmqConstant;
import org.springframework.amqp.core.Binding; import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder; import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.FanoutExchange; import org.springframework.amqp.core.FanoutExchange;
...@@ -14,7 +15,7 @@ import org.springframework.context.annotation.Configuration; ...@@ -14,7 +15,7 @@ import org.springframework.context.annotation.Configuration;
@Configuration @Configuration
public class FanoutExchangeConfig { public class FanoutExchangeConfig {
@Bean @Bean
public FanoutExchange fanoutExchange(){ public FanoutExchange fanoutExchange() {
return new FanoutExchange(RabbitmqConstant.USER_INFO_UPDATE_FANOUT_EXCHANGE); return new FanoutExchange(RabbitmqConstant.USER_INFO_UPDATE_FANOUT_EXCHANGE);
} }
......
package com.mmc.iuav.user.mq;
/**
* @author: zj
* @Date: 2023/6/26 17:57
*/
public class RabbitmqConstant {
public final static String USER_INFO_UPDATE_FANOUT_EXCHANGE = "USER_INFO_UPDATE_FANOUT_EXCHANGE";
public final static String USER_INFO_UPDATE_FANOUT_FORUM_QUEUE = "USER_INFO_UPDATE_FANOUT_FORUM_QUEUE";
}
package com.mmc.iuav.user.mq.constant; package com.mmc.iuav.user.mq.constant;
/** /**
* @author: lw * @author: zj
* @Date: 2023/8/23 11:26 * @Date: 2023/6/26 17:57
*/ */
public class RabbitmqConstant { public class RabbitmqConstant {
public final static String USER_INFO_UPDATE_FANOUT_EXCHANGE = "USER_INFO_UPDATE_FANOUT_EXCHANGE";
public final static String USER_INFO_UPDATE_FANOUT_FORUM_QUEUE = "USER_INFO_UPDATE_FANOUT_FORUM_QUEUE";
/** /**
* 用户充值订单交换机 * 用户充值订单交换机
*/ */
...@@ -20,5 +24,4 @@ public class RabbitmqConstant { ...@@ -20,5 +24,4 @@ public class RabbitmqConstant {
*/ */
public final static String USER_TOP_UP_SUCCESS_QUEUE = "USER_TOP_UP_SUCCESS_QUEUE"; public final static String USER_TOP_UP_SUCCESS_QUEUE = "USER_TOP_UP_SUCCESS_QUEUE";
public final static String USER_TOP_UP_SUCCESS_ROUTING_KEY = "USER_TOP_UP_SUCCESS_ROUTING_KEY"; public final static String USER_TOP_UP_SUCCESS_ROUTING_KEY = "USER_TOP_UP_SUCCESS_ROUTING_KEY";
} }
...@@ -3,7 +3,7 @@ package com.mmc.iuav.user.mq.impl; ...@@ -3,7 +3,7 @@ package com.mmc.iuav.user.mq.impl;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.mmc.iuav.user.model.vo.UserAccountVO; import com.mmc.iuav.user.model.vo.UserAccountVO;
import com.mmc.iuav.user.mq.MqProducer; import com.mmc.iuav.user.mq.MqProducer;
import com.mmc.iuav.user.mq.RabbitmqConstant; import com.mmc.iuav.user.mq.constant.RabbitmqConstant;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -19,7 +19,7 @@ import javax.annotation.Resource; ...@@ -19,7 +19,7 @@ import javax.annotation.Resource;
*/ */
@Slf4j @Slf4j
@Component @Component
public class MqConsumer { public class OrderMqConsumer {
@Resource @Resource
PayWalletService payWalletService; PayWalletService payWalletService;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论