diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/redpacket/SendRoomRedPacketCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/redpacket/SendRoomRedPacketCmdExe.java index b1349028..29c1b9fc 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/redpacket/SendRoomRedPacketCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/redpacket/SendRoomRedPacketCmdExe.java @@ -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); } }