From 8625ad3a8b321c5f914a5778279ac8e86277d34b Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Wed, 14 Jan 2026 15:32:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E9=80=81=E7=BA=A2=E5=8C=85=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=8C=BA=E5=9F=9F=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../other/app/command/redpacket/SendUserRedPacketCmdExe.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/redpacket/SendUserRedPacketCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/redpacket/SendUserRedPacketCmdExe.java index bea70c0a..73bbf0e4 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/redpacket/SendUserRedPacketCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/redpacket/SendUserRedPacketCmdExe.java @@ -7,6 +7,7 @@ import com.red.circle.other.app.convertor.UserRedPacketAppConvertor; import com.red.circle.other.app.dto.clientobject.UserRedPacketCO; import com.red.circle.other.app.dto.cmd.SendUserRedPacketCmd; import com.red.circle.other.domain.gateway.UserRedPacketGateway; +import com.red.circle.other.domain.gateway.user.ability.UserRegionGateway; import com.red.circle.other.domain.redpacket.RoomRedPacketType; import com.red.circle.other.domain.redpacket.UserRedPacket; import com.red.circle.other.domain.redpacket.UserRedPacketStatus; @@ -14,6 +15,7 @@ import com.red.circle.other.infra.database.cache.service.other.UserRedPacketCach import com.red.circle.other.infra.database.rds.entity.user.user.ConsumptionLevel; import com.red.circle.other.infra.database.rds.service.user.user.ConsumptionLevelService; import com.red.circle.other.inner.asserts.OtherErrorCode; +import com.red.circle.other.inner.asserts.user.UserRelationErrorCode; 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; @@ -43,6 +45,7 @@ public class SendUserRedPacketCmdExe { private final UserRedPacketCacheService userRedPacketCacheService; private final WalletGoldClient walletGoldClient; private final ConsumptionLevelService consumptionLevelService; + private final UserRegionGateway userRegionGateway; /** * 手续费比例:10% @@ -96,6 +99,8 @@ public class SendUserRedPacketCmdExe { Integer level = LevelUtils.getWealthLevel(SysOriginPlatformEnum.LIKEI, consumptionLevel.getConsumptionGolds().longValue()).getLevel(); ResponseAssert.isTrue(OtherErrorCode.USER_WEALTH_NEED_THAN_10, level >= 10); + boolean eqRegion = userRegionGateway.checkEqRegion(cmd.getReqUserId(), cmd.getReceiverUserId()); + ResponseAssert.isTrue(UserRelationErrorCode.UNAVAILABLE_NOT_REGION, eqRegion); } /**