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)