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) ); }