BUGFIX:普通生成积分扣除有误

This commit is contained in:
2025-08-27 13:44:32 +08:00
parent ee551a0be2
commit 98eb29eeb5
4 changed files with 15 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
package com.ai.da.common.RabbitMQ;
import com.ai.da.common.config.exception.BusinessException;
import com.ai.da.common.constant.CommonConstant;
import com.ai.da.common.utils.RedisUtil;
import com.ai.da.model.dto.GenerateThroughImageTextDTO;
@@ -149,6 +150,13 @@ public class GenerateConsumer {
// 存redis
redisUtil.addToMap(exceptionMapKey, exceptionInfo);
}
} catch (BusinessException e){
log.error(e.getMsg());
try {
channel.basicAck(msg.getMessageProperties().getDeliveryTag(), false);
} catch (IOException exception) {
log.error("手动确认,取消返回队列,不再重新消费");
}
} catch (Exception e) {
log.error(e.getMessage());
try {