This commit is contained in:
dute7liang
2024-01-14 03:38:50 +08:00
parent 7a6f9eecd3
commit d5deaacfe8
32 changed files with 323 additions and 135 deletions

View File

@@ -20,11 +20,16 @@ public class CheckTimeOutMqConsumer {
@RabbitListener(queues = CheckTimeOutMqConfig.QUEUE_NAME
,containerFactory = "customContainerFactory")
public void checkTimeOutMq(String message) {
log.info("checkTimeOutMq: " + message);
boolean next = settleService.withholdingFee(Long.valueOf(message));
if(next){
// 1分钟后继续执行
amqpProducer.sendCheckTimeOut(message,60);
log.info("开始执行预扣费: " + message);
try {
boolean next = settleService.withholdingFee(Long.valueOf(message));
if(next){
// 1分钟后继续执行
amqpProducer.sendCheckTimeOut(message,60);
}
}catch (Exception e){
log.error("每分钟定时扣费失败!",e);
}
}
}