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