抢红包报错文案处理

This commit is contained in:
tianfeng 2025-11-27 17:22:29 +08:00
parent 79fb067240
commit e0080ccf1f

View File

@ -5,6 +5,7 @@ import com.red.circle.external.inner.endpoint.message.ImGroupClient;
import com.red.circle.external.inner.model.cmd.message.BroadcastGroupMsgBodyCmd;
import com.red.circle.external.inner.model.cmd.message.CustomGroupMsgBodyCmd;
import com.red.circle.external.inner.model.enums.message.GroupMessageTypeEnum;
import com.red.circle.framework.core.asserts.ResponseAssert;
import com.red.circle.other.app.convertor.RoomRedPacketAppConvertor;
import com.red.circle.other.app.convertor.user.UserProfileAppConvertor;
import com.red.circle.other.app.dto.clientobject.RoomRedPacketCO;
@ -24,6 +25,7 @@ import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
import com.red.circle.tool.core.sequence.IdWorkerUtils;
import com.red.circle.tool.core.tuple.PennyAmount;
import com.red.circle.wallet.inner.endpoint.wallet.WalletGoldClient;
import com.red.circle.wallet.inner.error.WalletErrorCode;
import com.red.circle.wallet.inner.model.cmd.GoldReceiptCmd;
import com.red.circle.wallet.inner.model.cmd.WalletReceiptCmd;
import com.red.circle.wallet.inner.model.enums.GoldOrigin;
@ -179,7 +181,7 @@ public class SendRoomRedPacketCmdExe {
walletGoldClient.changeBalance(build);
} catch (Exception e) {
log.error("扣除金币失败 userId={} amount={} packetId={}", userId, cmd.getTotalAmount(), packetId, e);
throw new RuntimeException(OtherErrorCode.RED_PACKET_INSUFFICIENT_BALANCE.getMessage());
ResponseAssert.isTrue(WalletErrorCode.INSUFFICIENT_BALANCE, false);
}
}