From a38dd91403848ec1d724d052bbb15d633c345563 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Wed, 29 Apr 2026 22:40:46 +0800 Subject: [PATCH] =?UTF-8?q?cp=E5=8F=91=E9=80=81=E5=A4=B4=E9=A5=B0=E9=80=BB?= =?UTF-8?q?=E8=BE=91=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 fa9f722253e507477d26183d9afbf39f65c89ba4) --- .../app/service/user/CpLevelUpAvatarFrameService.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 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 18a77bcb..5c9d1558 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 @@ -5,6 +5,7 @@ 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; import com.red.circle.other.domain.model.user.UserProfile; +import com.red.circle.other.infra.database.rds.entity.props.PropsBackpack; 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; @@ -16,6 +17,7 @@ import com.red.circle.other.inner.model.dto.activity.props.ActivityRewardProps; import com.red.circle.other.inner.model.dto.material.props.ProductProps; import com.red.circle.other.inner.model.dto.material.props.PropsResources; import com.red.circle.tool.core.collection.CollectionUtils; +import com.red.circle.tool.core.date.TimestampUtils; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -34,7 +36,7 @@ import java.util.Objects; @RequiredArgsConstructor public class CpLevelUpAvatarFrameService { - private static final int DAYS = 36500; + private static final int DAYS = 30; private final CpValueService cpValueService; private final UserProfileGateway userProfileGateway; @@ -110,8 +112,9 @@ public class CpLevelUpAvatarFrameService { return; } - if (propsBackpackService.getUserProps(userId, propsSourceId, PropsCommodityType.AVATAR_FRAME) != null) { - log.info("CP头像框已存在背包,跳过发放, userId={}, propsSourceId={}", userId, propsSourceId); + PropsBackpack userProps = propsBackpackService.getUserProps(userId, propsSourceId, PropsCommodityType.AVATAR_FRAME); + if (userProps != null && TimestampUtils.expiredIntervalMillisecond(userProps.getExpireTime(), TimestampUtils.now()) < 0) { + log.info("CP头像框未过期已存在背包,跳过发放, userId={}, propsSourceId={}", userId, propsSourceId); return; }