From 5bcf9c36ce1032e404dec5ffc3dd2da4859357a4 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Fri, 23 Jan 2026 17:08:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=A4=84=E7=90=86=E4=B8=BA=20=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=9C=AA=E8=BF=87=E6=9C=9F=E7=9A=84=E9=81=93=E5=85=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../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, 5 insertions(+), 14 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 1ef72306..541efc73 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 listNotExpiredUseProps(Set userIds); + List listNotExpiredProps(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 b92572c3..6c58e1af 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,14 +194,13 @@ public class PropsBackpackServiceImpl extends } @Override - public List listNotExpiredUseProps(Set userIds) { + public List listNotExpiredProps(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 a2e2b770..d4d77699 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,7 +21,6 @@ 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; @@ -31,8 +30,6 @@ 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; @@ -48,17 +45,13 @@ 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; @@ -389,7 +382,7 @@ public class UserRunProfileTransportGatewayImpl implements UserRunProfileTranspo } List propsBackpacks = propsUserInfraConvertor.toListPropsBackpackDTO( - propsBackpackService.listNotExpiredUseProps(userIds) + propsBackpackService.listNotExpiredProps(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 5df76550..ce474c1c 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,7 +22,6 @@ 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; @@ -145,7 +144,7 @@ public class PropsBackpackClientServiceImpl implements PropsBackpackClientServic @Override public List listNotExpiredUseProps(Set userIds) { return propsInnerConvertor.toListPropsBackpackDTO( - propsBackpackService.listNotExpiredUseProps(userIds) + propsBackpackService.listNotExpiredProps(userIds) ); }