fix: 查询时间搜索值为时间戳

This commit is contained in:
TsMask
2024-04-15 20:18:02 +08:00
parent 88af476a41
commit 206e1457f4
7 changed files with 14 additions and 35 deletions

View File

@@ -6,7 +6,6 @@ import (
"be.ems/src/framework/datasource"
"be.ems/src/framework/logger"
"be.ems/src/framework/utils/date"
"be.ems/src/framework/utils/parse"
"be.ems/src/framework/utils/repo"
"be.ems/src/modules/monitor/model"
@@ -80,8 +79,7 @@ func (r *SysJobLogImpl) SelectJobLogPage(query map[string]any) map[string]any {
}
if ok && beginTime != "" {
conditions = append(conditions, "create_time >= ?")
beginDate := date.ParseStrToDate(beginTime.(string), date.YYYY_MM_DD)
params = append(params, beginDate.UnixMilli())
params = append(params, parse.Number(beginTime.(string)))
}
endTime, ok := query["endTime"]
if !ok {
@@ -89,8 +87,7 @@ func (r *SysJobLogImpl) SelectJobLogPage(query map[string]any) map[string]any {
}
if ok && endTime != "" {
conditions = append(conditions, "create_time <= ?")
endDate := date.ParseStrToDate(endTime.(string), date.YYYY_MM_DD)
params = append(params, endDate.UnixMilli())
params = append(params, parse.Number(endTime.(string)))
}
// 构建查询条件语句