fix: cdr/ue查询时间字段改用记录时间,传入时间解析时区UTC0导致无法正常查询
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
// 各个网元特殊查询条件
|
||||
|
||||
@@ -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, ",")
|
||||
|
||||
Reference in New Issue
Block a user