Quellcode durchsuchen

Merge branch 'dev'
1

wangliang vor 4 Jahren
Ursprung
Commit
bdf42ea144

+ 2 - 2
themis-mq/src/main/java/com/qmth/themis/mq/service/impl/MqLogicServiceImpl.java

@@ -791,7 +791,7 @@ public class MqLogicServiceImpl implements MqLogicService {
                     if (Objects.nonNull(mqDto.getAck()) && mqDto.getAck().intValue() != SystemConstant.STANDARD_ACK_TYPE && Objects.nonNull(redisUtil.get(SystemConstant.MQ_TOPIC_BUFFER_LIST, mqDto.getId())) && redisUtil.lock(SystemConstant.REDIS_LOCK_MQ_PREFIX + mqDto.getId(), SystemConstant.REDIS_LOCK_MQ_TIME_OUT)) {
                         Method method = this.getClass().getDeclaredMethod(mqExecTypeEnum.getDesc(), MqDto.class, String.class);
                         log.info(":{}-:{} 准备执行mq exec:{}逻辑", threadId, threadName, method.getName());
-                        method.invoke(this, mqDto, SystemConstant.MQ_TOPIC_BUFFER_LIST);
+                        method.invoke(SpringContextHolder.getBean(MqLogicService.class), mqDto, SystemConstant.MQ_TOPIC_BUFFER_LIST);
                         return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
                     }
                 }
@@ -832,7 +832,7 @@ public class MqLogicServiceImpl implements MqLogicService {
                     if (Objects.nonNull(mqDto.getAck()) && mqDto.getAck().intValue() != SystemConstant.STANDARD_ACK_TYPE && Objects.nonNull(SystemConstant.MQ_DELAY_TOPIC_BUFFER_LIST) && redisUtil.lock(SystemConstant.REDIS_LOCK_MQ_PREFIX + mqDto.getId(), SystemConstant.REDIS_LOCK_MQ_TIME_OUT)) {
                         Method method = this.getClass().getDeclaredMethod(mqExecTypeEnum.getDesc(), MqDto.class, String.class);
                         log.info(":{}-:{} 准备执行mq exec:{}逻辑", threadId, threadName, method.getName());
-                        method.invoke(this, mqDto, SystemConstant.MQ_DELAY_TOPIC_BUFFER_LIST);
+                        method.invoke(SpringContextHolder.getBean(MqLogicService.class), mqDto, SystemConstant.MQ_DELAY_TOPIC_BUFFER_LIST);
                         return ConsumeConcurrentlyStatus.CONSUME_SUCCESS;
                     }
                 }