fix
This commit is contained in:
parent
2a2bf99239
commit
f7dc9427ac
@ -90,7 +90,7 @@ public class KeyInfoServiceImpl implements KeyInfoService {
|
|||||||
LocalDateTime now = LocalDateTime.now();
|
LocalDateTime now = LocalDateTime.now();
|
||||||
LambdaQueryWrapper<KeyInfo> wrapper = new LambdaQueryWrapper<KeyInfo>()
|
LambdaQueryWrapper<KeyInfo> wrapper = new LambdaQueryWrapper<KeyInfo>()
|
||||||
.eq(StringUtils.hasText(query.getKeyType()), KeyInfo::getKeyType, query.getKeyType())
|
.eq(StringUtils.hasText(query.getKeyType()), KeyInfo::getKeyType, query.getKeyType())
|
||||||
.eq(StringUtils.hasText(query.getStatus()), KeyInfo::getStatus, query.getStatus())
|
// .eq(StringUtils.hasText(query.getStatus()), KeyInfo::getStatus, query.getStatus())
|
||||||
// .eq(KeyInfo::getDeleted, false)
|
// .eq(KeyInfo::getDeleted, false)
|
||||||
.orderByDesc(KeyInfo::getCreateTime);
|
.orderByDesc(KeyInfo::getCreateTime);
|
||||||
if (StringUtils.hasText(query.getStatus())) {
|
if (StringUtils.hasText(query.getStatus())) {
|
||||||
@ -101,6 +101,10 @@ public class KeyInfoServiceImpl implements KeyInfoService {
|
|||||||
} else if (KeyStatus.EXPIRED == queryStatus) {
|
} else if (KeyStatus.EXPIRED == queryStatus) {
|
||||||
wrapper.eq(KeyInfo::getStatus, KeyStatus.ENABLED.getCode())
|
wrapper.eq(KeyInfo::getStatus, KeyStatus.ENABLED.getCode())
|
||||||
.lt(KeyInfo::getExpiredTime, now);
|
.lt(KeyInfo::getExpiredTime, now);
|
||||||
|
} else if (KeyStatus.ENABLED == queryStatus) {
|
||||||
|
wrapper.eq(KeyInfo::getStatus, KeyStatus.ENABLED.getCode())
|
||||||
|
.lt(KeyInfo::getEffectiveTime, now)
|
||||||
|
.gt(KeyInfo::getExpiredTime, now);
|
||||||
} else {
|
} else {
|
||||||
wrapper.eq(KeyInfo::getStatus, query.getStatus());
|
wrapper.eq(KeyInfo::getStatus, query.getStatus());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user