From 9728ff7a766ea1e24b6945bab244d91585333bb6 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Wed, 29 Apr 2026 23:51:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E6=94=BE=E5=A4=B4=E5=83=8F=E6=A1=86?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit a29a804379842b3e6e5a8e3ae62231cb7f96b7da) --- .../user/CpLevelUpAvatarFrameService.java | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) 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 0fb864d5..38bfc4e9 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 @@ -1,6 +1,7 @@ package com.red.circle.other.app.service.user; import com.red.circle.common.business.core.enums.SysOriginPlatformEnum; +import com.red.circle.common.business.enums.SendPropsOrigin; import com.red.circle.other.domain.gateway.props.ActivitySourceGroupGateway; import com.red.circle.other.domain.gateway.props.PropsStoreGateway; import com.red.circle.other.domain.gateway.user.UserProfileGateway; @@ -10,8 +11,10 @@ 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.endpoint.material.props.PropsBackpackClient; 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.cmd.material.GivePropsBackpackCmd; 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; @@ -43,6 +46,7 @@ public class CpLevelUpAvatarFrameService { private final ActivitySourceGroupGateway activitySourceGroupGateway; private final PropsStoreGateway propsStoreGateway; private final PropsBackpackService propsBackpackService; + private final PropsBackpackClient propsBackpackClient; /** * CP值累加后调用,检测是否升级并发放对应头像框. @@ -118,17 +122,23 @@ public class CpLevelUpAvatarFrameService { // return; // } - propsStoreGateway.shippingProductProps(new ProductProps() - .setInitiateUserId(userId) - .setAcceptUserId(userId) - .setDays(DAYS) - .setPropsOrigin("CP_LEVEL_UP_AVATAR_FRAME") - .setPropsOriginDesc("CP level up avatar frame grant") - .setPropsResources(propsResources) - .setPropsPrices(BigDecimal.ZERO) - .setFree(Boolean.TRUE) - ); - log.info("CP升级发放头像框, userId={}, cpUserId={}, propsSourceId={}", userId, cpUserId, propsSourceId); + Integer days = 30; + String type = "AVATAR_FRAME"; + GivePropsBackpackCmd cmd = new GivePropsBackpackCmd() + .setAcceptUserId(userId) + .setPropsId(propsSourceId) + .setType(type) + .setOrigin(SendPropsOrigin.LOTTERY_REWARD.name()) + .setOriginDesc(SendPropsOrigin.LOTTERY_REWARD.getDesc()) + .setDays(days) + .setUseProps(Boolean.FALSE) + .setAllowGive(Boolean.FALSE) + .setOpUser(userId); + + propsBackpackClient.giveProps(cmd); + + // 发送通知 + propsBackpackClient.givePropsNotify(userId, type, days, propsSourceId); } }