refactor(code): 优化数据聚合查询逻辑与条件处理

- 重构数据聚合查询流程,减少多次数据库查询,提升性能
- 引入聚合表达式列表和元数据结构,简化查询逻辑
- 优化条件判断,确保不必要的字段被正确过滤
- 改进区域统计逻辑,使用单次查询替代逐个计数,提高效率
- 更新搜索功能,确保请求数据的有效性
This commit is contained in:
2026-05-17 04:08:54 +08:00
parent 66dee150c7
commit ef10437a5a
2 changed files with 91 additions and 94 deletions
+3 -1
View File
@@ -1307,7 +1307,9 @@ func (that *MakeCode) Search(table string, userData Map, data Map, req *http.Req
}
if len(reqValue) != 0 && reqValue[0] != "" {
data[searchItemName] = reqValue
if that.TableColumns[table][searchItemName] != nil {
data[searchItemName] = reqValue
}
}
}