fix: cdr/ue查询时间字段改用记录时间,传入时间解析时区UTC0导致无法正常查询

This commit is contained in:
TsMask
2025-08-08 19:17:09 +08:00
parent c0f5ea0003
commit b7e4948fbb
2 changed files with 4 additions and 4 deletions

View File

@@ -29,13 +29,13 @@ func (r CDREvent) SelectByPage(neType string, query map[string]string) ([]model.
if len(v) == 10 {
v = v + "000"
}
tx = tx.Where("timestamp >= ?", v)
tx = tx.Where("created_at >= ?", v)
}
if v, ok := query["endTime"]; ok && v != "" {
if len(v) == 10 {
v = v + "000"
}
tx = tx.Where("timestamp <= ?", v)
tx = tx.Where("created_at <= ?", v)
}
// 各个网元特殊查询条件

View File

@@ -29,13 +29,13 @@ func (r UEEvent) SelectByPage(neType string, query map[string]string) ([]model.U
if len(v) == 10 {
v = v + "000"
}
tx = tx.Where("timestamp >= ?", v)
tx = tx.Where("created_at >= ?", v)
}
if v, ok := query["endTime"]; ok && v != "" {
if len(v) == 10 {
v = v + "000"
}
tx = tx.Where("timestamp <= ?", v)
tx = tx.Where("created_at <= ?", v)
}
if v, ok := query["eventType"]; ok && v != "" {
eventTypes := strings.Split(v, ",")