mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 05:43:51 +00:00
Opt knowledge data (#1769)
This commit is contained in:
@@ -467,6 +467,9 @@ public class DictUtils {
|
||||
|
||||
private String generateDictDateFilter(DictItemResp dictItemResp) {
|
||||
ItemValueConfig config = dictItemResp.getConfig();
|
||||
if (!partitionedModel(dictItemResp.getModelId())) {
|
||||
return "";
|
||||
}
|
||||
// 未进行设置
|
||||
if (Objects.isNull(config) || Objects.isNull(config.getDateConf())) {
|
||||
return defaultDateFilter();
|
||||
@@ -489,6 +492,17 @@ public class DictUtils {
|
||||
return "";
|
||||
}
|
||||
|
||||
private boolean partitionedModel(Long modelId) {
|
||||
ModelResp model = modelService.getModel(modelId);
|
||||
if (Objects.nonNull(model)) {
|
||||
List<Dim> timeDims = model.getTimeDimension();
|
||||
if (!CollectionUtils.isEmpty(timeDims)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private String generateDictDateFilterRecent(DictItemResp dictItemResp) {
|
||||
ModelResp model = modelService.getModel(dictItemResp.getModelId());
|
||||
if (Objects.nonNull(model)) {
|
||||
|
||||
Reference in New Issue
Block a user