diff --git a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/user/UserProfileDTO.java b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/user/UserProfileDTO.java index 852fc009..2db6cdd3 100644 --- a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/user/UserProfileDTO.java +++ b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/model/dto/user/UserProfileDTO.java @@ -23,6 +23,8 @@ import java.util.function.Predicate; import java.util.stream.Collectors; import lombok.Data; +import static com.red.circle.common.business.enums.AccountStatusEnum.ARCHIVE; + /** * 用户资料. * @@ -265,6 +267,11 @@ public class UserProfileDTO implements Serializable { return AccountStatusEnum.NORMAL; } + // 封存了,但是时间过期了 + if (Objects.equals(ARCHIVE.name(), this.accountStatus) && !this.checkAccountFreeze()) { + return AccountStatusEnum.NORMAL; + } + if (this.checkAccountFreeze()) { return AccountStatusEnum.FREEZE; } diff --git a/rc-service/rc-service-other/other-domain/src/main/java/com/red/circle/other/domain/model/user/UserProfile.java b/rc-service/rc-service-other/other-domain/src/main/java/com/red/circle/other/domain/model/user/UserProfile.java index b0d8d022..f82f796f 100644 --- a/rc-service/rc-service-other/other-domain/src/main/java/com/red/circle/other/domain/model/user/UserProfile.java +++ b/rc-service/rc-service-other/other-domain/src/main/java/com/red/circle/other/domain/model/user/UserProfile.java @@ -19,6 +19,9 @@ import java.util.function.Predicate; import java.util.stream.Collectors; import lombok.Data; +import static com.red.circle.common.business.enums.AccountStatusEnum.ARCHIVE; +import static com.red.circle.common.business.enums.AccountStatusEnum.ARCHIVE_DEVICE; + /** * 用户模型. * @@ -240,7 +243,10 @@ public class UserProfile implements Serializable { * @return true 是, false 否 */ public boolean checkAccountArchive() { - return AccountStatusEnum.isArchive(this.getAccountStatus()); + if (Objects.equals(ARCHIVE_DEVICE.name(), this.getAccountStatus())) { + return true; + } + return Objects.equals(ARCHIVE.name(), this.getAccountStatus()) && checkAccountFreeze(); } /**