user profile dto 封禁校验带上时间参数
This commit is contained in:
parent
66480b6747
commit
7907ab9024
@ -23,6 +23,8 @@ import java.util.function.Predicate;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import lombok.Data;
|
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;
|
return AccountStatusEnum.NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 封存了,但是时间过期了
|
||||||
|
if (Objects.equals(ARCHIVE.name(), this.accountStatus) && !this.checkAccountFreeze()) {
|
||||||
|
return AccountStatusEnum.NORMAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.checkAccountFreeze()) {
|
if (this.checkAccountFreeze()) {
|
||||||
return AccountStatusEnum.FREEZE;
|
return AccountStatusEnum.FREEZE;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,9 @@ import java.util.function.Predicate;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import lombok.Data;
|
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 否
|
* @return true 是, false 否
|
||||||
*/
|
*/
|
||||||
public boolean checkAccountArchive() {
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user