fix: 操作日志时间查询支持时分秒
This commit is contained in:
@@ -76,7 +76,7 @@ func (r *SysLogLoginImpl) SelectSysLogLoginPage(query map[string]any) map[string
|
|||||||
}
|
}
|
||||||
if ok && beginTime != "" {
|
if ok && beginTime != "" {
|
||||||
conditions = append(conditions, "login_time >= ?")
|
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())
|
params = append(params, beginDate.UnixMilli())
|
||||||
}
|
}
|
||||||
endTime, ok := query["endTime"]
|
endTime, ok := query["endTime"]
|
||||||
@@ -85,7 +85,7 @@ func (r *SysLogLoginImpl) SelectSysLogLoginPage(query map[string]any) map[string
|
|||||||
}
|
}
|
||||||
if ok && endTime != "" {
|
if ok && endTime != "" {
|
||||||
conditions = append(conditions, "login_time <= ?")
|
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())
|
params = append(params, endDate.UnixMilli())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ func (r *SysLogOperateImpl) SelectSysLogOperatePage(query map[string]any) map[st
|
|||||||
}
|
}
|
||||||
if ok && beginTime != "" {
|
if ok && beginTime != "" {
|
||||||
conditions = append(conditions, "oper_time >= ?")
|
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())
|
params = append(params, beginDate.UnixMilli())
|
||||||
}
|
}
|
||||||
endTime, ok := query["endTime"]
|
endTime, ok := query["endTime"]
|
||||||
@@ -98,7 +98,7 @@ func (r *SysLogOperateImpl) SelectSysLogOperatePage(query map[string]any) map[st
|
|||||||
}
|
}
|
||||||
if ok && endTime != "" {
|
if ok && endTime != "" {
|
||||||
conditions = append(conditions, "oper_time <= ?")
|
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())
|
params = append(params, endDate.UnixMilli())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user