From b47e36fcb21e9108e4d2b6412ccaa575b08709cd Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Wed, 29 Apr 2026 20:16:21 +0800 Subject: [PATCH] =?UTF-8?q?cp=E5=A4=B4=E9=A5=B0=E5=8F=91=E9=80=81=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit b7b181adf239737ee643511ce4109cc081aec23c) --- .../app/service/user/CpLevelUpAvatarFrameService.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/CpLevelUpAvatarFrameService.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/CpLevelUpAvatarFrameService.java index 404a11d3..18a77bcb 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/CpLevelUpAvatarFrameService.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/CpLevelUpAvatarFrameService.java @@ -8,7 +8,9 @@ import com.red.circle.other.domain.model.user.UserProfile; import com.red.circle.other.infra.database.rds.entity.user.user.CpLevelConfig; import com.red.circle.other.infra.database.rds.entity.user.user.CpRelationship; import com.red.circle.other.infra.database.rds.service.user.user.CpValueService; +import com.red.circle.other.infra.database.rds.service.props.PropsBackpackService; import com.red.circle.other.inner.enums.activity.PropsActivityTypeEnum; +import com.red.circle.other.inner.enums.material.PropsCommodityType; import com.red.circle.other.inner.model.dto.activity.props.ActivityResource; import com.red.circle.other.inner.model.dto.activity.props.ActivityRewardProps; import com.red.circle.other.inner.model.dto.material.props.ProductProps; @@ -38,6 +40,7 @@ public class CpLevelUpAvatarFrameService { private final UserProfileGateway userProfileGateway; private final ActivitySourceGroupGateway activitySourceGroupGateway; private final PropsStoreGateway propsStoreGateway; + private final PropsBackpackService propsBackpackService; /** * CP值累加后调用,检测是否升级并发放对应头像框. @@ -107,6 +110,11 @@ public class CpLevelUpAvatarFrameService { return; } + if (propsBackpackService.getUserProps(userId, propsSourceId, PropsCommodityType.AVATAR_FRAME) != null) { + log.info("CP头像框已存在背包,跳过发放, userId={}, propsSourceId={}", userId, propsSourceId); + return; + } + propsStoreGateway.shippingProductProps(new ProductProps() .setInitiateUserId(userId) .setAcceptUserId(userId)