From 44c70bcac5412b28b0f9c5104db02721fa81b7b4 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Fri, 23 Jan 2026 17:46:04 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=A4=84=E7=90=86=E4=B8=BA=20=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=9C=AA=E8=BF=87=E6=9C=9F=E7=9A=84=E9=81=93=E5=85=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 5bcf9c36ce1032e404dec5ffc3dd2da4859357a4. --- .../database/rds/service/props/PropsBackpackService.java | 4 ++-- .../rds/service/props/impl/PropsBackpackServiceImpl.java | 3 ++- .../gateway/user/UserRunProfileTransportGatewayImpl.java | 9 ++++++++- .../props/impl/PropsBackpackClientServiceImpl.java | 3 ++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/props/PropsBackpackService.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/props/PropsBackpackService.java index 541efc73..1ef72306 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/props/PropsBackpackService.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/props/PropsBackpackService.java @@ -131,9 +131,9 @@ public interface PropsBackpackService extends BaseService { List listNotExpiredUseProps(Long userId); /** - * 获取一组未过期的道具信息. + * 获取一组正在使用道具信息. */ - List listNotExpiredProps(Set userIds); + List listNotExpiredUseProps(Set userIds); /** * 获取一组正在使用道具信息. diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/props/impl/PropsBackpackServiceImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/props/impl/PropsBackpackServiceImpl.java index 6c58e1af..b92572c3 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/props/impl/PropsBackpackServiceImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/rds/service/props/impl/PropsBackpackServiceImpl.java @@ -194,13 +194,14 @@ public class PropsBackpackServiceImpl extends } @Override - public List listNotExpiredProps(Set userIds) { + public List listNotExpiredUseProps(Set userIds) { if (CollectionUtils.isEmpty(userIds)) { return Lists.newArrayList(); } return Optional.ofNullable(query() .in(userIds.size() > 1, PropsBackpack::getUserId, userIds) .eq(Objects.equals(userIds.size(), 1), PropsBackpack::getUserId, userIds.iterator().next()) + .eq(PropsBackpack::getUseProps, Boolean.TRUE) .gt(PropsBackpack::getExpireTime, TimestampUtils.now()) .list()) .orElse(Lists.newArrayList()); diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/user/UserRunProfileTransportGatewayImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/user/UserRunProfileTransportGatewayImpl.java index 5213ddc7..dba58552 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/user/UserRunProfileTransportGatewayImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/user/UserRunProfileTransportGatewayImpl.java @@ -21,6 +21,7 @@ import com.red.circle.other.infra.database.rds.entity.family.FamilyMemberInfo; import com.red.circle.other.infra.database.rds.entity.props.PropsBackpack; import com.red.circle.other.infra.database.rds.entity.user.user.BaseInfo; import com.red.circle.other.infra.database.rds.entity.user.user.OneTimeTask; +import com.red.circle.other.infra.database.rds.entity.user.user.CpRelationship; import com.red.circle.other.infra.database.rds.service.badge.BadgeConfigService; import com.red.circle.other.infra.database.rds.service.badge.BadgePictureConfigService; import com.red.circle.other.infra.database.rds.service.family.FamilyMemberInfoService; @@ -30,6 +31,8 @@ import com.red.circle.other.infra.database.rds.service.props.RoomThemeUserBackpa import com.red.circle.other.infra.database.rds.service.props.RoomThemeUserCustomizeService; import com.red.circle.other.infra.database.rds.service.user.user.BaseInfoService; import com.red.circle.other.infra.database.rds.service.user.user.OneTimeTaskService; +import com.red.circle.other.infra.database.rds.service.user.user.CpRelationshipService; +import com.red.circle.other.infra.database.rds.service.user.user.CpValueService; import com.red.circle.other.infra.utils.ZonedDateTimeUtils; import com.red.circle.other.inner.enums.material.BadgeBackpackExpireType; import com.red.circle.other.inner.enums.material.BadgeConfigTypeEnum; @@ -45,13 +48,17 @@ import com.red.circle.other.inner.model.dto.material.UseBadgeDTO; import com.red.circle.other.inner.model.dto.material.UsePropsDTO; import com.red.circle.other.inner.model.dto.material.props.PropsNobleVipAbilityDTO; import com.red.circle.other.inner.model.dto.user.PhotoItem; +import com.red.circle.other.inner.model.dto.user.CpSimpleUserProfileCO; import com.red.circle.tool.core.collection.CollectionUtils; +import com.red.circle.tool.core.date.DateUtils; import com.red.circle.tool.core.date.TimestampUtils; import com.red.circle.tool.core.json.JacksonUtils; +import java.math.BigDecimal; import java.sql.Timestamp; import java.time.Duration; import java.time.LocalDateTime; +import java.time.ZoneId; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -383,7 +390,7 @@ public class UserRunProfileTransportGatewayImpl implements UserRunProfileTranspo } List propsBackpacks = propsUserInfraConvertor.toListPropsBackpackDTO( - propsBackpackService.listNotExpiredProps(userIds) + propsBackpackService.listNotExpiredUseProps(userIds) ); if (CollectionUtils.isEmpty(propsBackpacks)) { diff --git a/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/material/props/impl/PropsBackpackClientServiceImpl.java b/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/material/props/impl/PropsBackpackClientServiceImpl.java index ce474c1c..5df76550 100644 --- a/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/material/props/impl/PropsBackpackClientServiceImpl.java +++ b/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/material/props/impl/PropsBackpackClientServiceImpl.java @@ -22,6 +22,7 @@ import java.math.BigDecimal; import java.sql.Timestamp; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -144,7 +145,7 @@ public class PropsBackpackClientServiceImpl implements PropsBackpackClientServic @Override public List listNotExpiredUseProps(Set userIds) { return propsInnerConvertor.toListPropsBackpackDTO( - propsBackpackService.listNotExpiredProps(userIds) + propsBackpackService.listNotExpiredUseProps(userIds) ); }