diff --git a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/enums/material/BadgeConfigTypeEnum.java b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/enums/material/BadgeConfigTypeEnum.java index fa0ff530..c528df8f 100644 --- a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/enums/material/BadgeConfigTypeEnum.java +++ b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/enums/material/BadgeConfigTypeEnum.java @@ -24,6 +24,16 @@ public enum BadgeConfigTypeEnum { */ ACTIVITY, + /** + * 荣誉活动. + */ + HONOR_ACTIVITY, + + /** + * 荣誉成就. + */ + HONOR_ACHIEVEMENT, + /** * 房间徽章. */ diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UseOwnedBadgeQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UseOwnedBadgeQryExe.java index 7b59a650..ac3ba35f 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UseOwnedBadgeQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UseOwnedBadgeQryExe.java @@ -11,6 +11,7 @@ import com.red.circle.other.infra.common.props.UserBadgeCommon; import com.red.circle.other.infra.database.rds.entity.badge.BadgeBackpack; import com.red.circle.other.infra.database.rds.service.badge.BadgeBackpackService; import com.red.circle.other.infra.database.rds.service.badge.BadgeConfigService; +import com.red.circle.other.inner.enums.material.BadgeBackpackExpireType; import com.red.circle.other.inner.enums.sys.SysBadgeConfigTypeEnum; import com.red.circle.other.inner.model.dto.material.BadgeConfigDetailsDTO; import com.red.circle.other.inner.model.dto.material.UseBadgeDTO; @@ -41,7 +42,12 @@ public class UseOwnedBadgeQryExe { // 查询用户所有未过期的徽章 LambdaQueryWrapper eq = Wrappers.lambdaQuery(BadgeBackpack.class) .eq(BadgeBackpack::getUserId, userProfile.getId()) - .ge(BadgeBackpack::getExpireTime, TimestampUtils.now()); + .and(e -> { + e.ge(BadgeBackpack::getExpireTime, TimestampUtils.now()) + .or() + .eq(BadgeBackpack::getExpireType, BadgeBackpackExpireType.PERMANENT.name()); + + }); List badgeBackpacks = badgeBackpackService.list(eq); Set badgeIdSet = badgeBackpacks.stream() diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/resources/i18n/messages_en.properties b/rc-service/rc-service-other/other-infrastructure/src/main/resources/i18n/messages_en.properties index 85abed98..e5e1d98e 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/resources/i18n/messages_en.properties +++ b/rc-service/rc-service-other/other-infrastructure/src/main/resources/i18n/messages_en.properties @@ -40,4 +40,7 @@ props.type.DATA_CARD=Card Decoration props.type.SPECIAL_ID=Special ID props.type.ACTIVITY=Badge props.type.ADMINISTRATOR=Badge +props.type.ACHIEVEMENT=Badge +props.type.HONOR_ACTIVITY=Honor +props.type.HONOR_ACHIEVEMENT=Honor