fix: 操作日志时间查询支持时分秒

This commit is contained in:
TsMask
2024-03-18 11:03:35 +08:00
parent 3846c557c4
commit b8244ed242
2 changed files with 4 additions and 4 deletions

View File

@@ -76,7 +76,7 @@ func (r *SysLogLoginImpl) SelectSysLogLoginPage(query map[string]any) map[string
}
if ok && beginTime != "" {
conditions = append(conditions, "login_time >= ?")
beginDate := date.ParseStrToDate(beginTime.(string), date.YYYY_MM_DD)
beginDate := date.ParseStrToDate(beginTime.(string), date.YYYY_MM_DD_HH_MM_SS)
params = append(params, beginDate.UnixMilli())
}
endTime, ok := query["endTime"]
@@ -85,7 +85,7 @@ func (r *SysLogLoginImpl) SelectSysLogLoginPage(query map[string]any) map[string
}
if ok && endTime != "" {
conditions = append(conditions, "login_time <= ?")
endDate := date.ParseStrToDate(endTime.(string), date.YYYY_MM_DD)
endDate := date.ParseStrToDate(endTime.(string), date.YYYY_MM_DD_HH_MM_SS)
params = append(params, endDate.UnixMilli())
}

View File

@@ -89,7 +89,7 @@ func (r *SysLogOperateImpl) SelectSysLogOperatePage(query map[string]any) map[st
}
if ok && beginTime != "" {
conditions = append(conditions, "oper_time >= ?")
beginDate := date.ParseStrToDate(beginTime.(string), date.YYYY_MM_DD)
beginDate := date.ParseStrToDate(beginTime.(string), date.YYYY_MM_DD_HH_MM_SS)
params = append(params, beginDate.UnixMilli())
}
endTime, ok := query["endTime"]
@@ -98,7 +98,7 @@ func (r *SysLogOperateImpl) SelectSysLogOperatePage(query map[string]any) map[st
}
if ok && endTime != "" {
conditions = append(conditions, "oper_time <= ?")
endDate := date.ParseStrToDate(endTime.(string), date.YYYY_MM_DD)
endDate := date.ParseStrToDate(endTime.(string), date.YYYY_MM_DD_HH_MM_SS)
params = append(params, endDate.UnixMilli())
}