mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-22 06:44:18 +08:00
Compare commits
2 Commits
master
...
eaca4dddfa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eaca4dddfa | ||
|
|
4bb0aae8fc |
@@ -425,8 +425,12 @@ public class DictUtils {
|
|||||||
.format(DateTimeFormatter.ofPattern(format));
|
.format(DateTimeFormatter.ofPattern(format));
|
||||||
String end = LocalDate.now().minusDays(itemValueDateEnd)
|
String end = LocalDate.now().minusDays(itemValueDateEnd)
|
||||||
.format(DateTimeFormatter.ofPattern(format));
|
.format(DateTimeFormatter.ofPattern(format));
|
||||||
return String.format("( %s >= '%s' and %s <= '%s' )", dateConf.getDateField(), start,
|
if (Objects.nonNull(dateConf)) {
|
||||||
dateConf.getDateField(), end);
|
return String.format("( %s >= '%s' and %s <= '%s' )", dateConf.getDateField(), start,
|
||||||
|
dateConf.getDateField(), end);
|
||||||
|
} else {
|
||||||
|
return String.format("( %s >= '%s' and %s <= '%s' )", "dt", start, "dt", end);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String generateDictDateFilter(DictItemResp dictItemResp) {
|
private String generateDictDateFilter(DictItemResp dictItemResp) {
|
||||||
@@ -440,7 +444,7 @@ public class DictUtils {
|
|||||||
}
|
}
|
||||||
// 未进行设置
|
// 未进行设置
|
||||||
if (Objects.isNull(config) || Objects.isNull(config.getDateConf())) {
|
if (Objects.isNull(config) || Objects.isNull(config.getDateConf())) {
|
||||||
return defaultDateFilter(config.getDateConf());
|
return defaultDateFilter(null);
|
||||||
}
|
}
|
||||||
// 全表扫描
|
// 全表扫描
|
||||||
if (DateConf.DateMode.ALL.equals(config.getDateConf().getDateMode())) {
|
if (DateConf.DateMode.ALL.equals(config.getDateConf().getDateMode())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user