merge: 合并代码
This commit is contained in:
@@ -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/system/model"
|
||||
@@ -69,7 +68,7 @@ func (r *SysLogOperateImpl) SelectSysLogOperatePage(query map[string]any) map[st
|
||||
var params []any
|
||||
if v, ok := query["title"]; ok && v != "" {
|
||||
conditions = append(conditions, "title like concat(?, '%')")
|
||||
params = append(params, v)
|
||||
params = append(params, strings.TrimSpace(v.(string)))
|
||||
}
|
||||
if v, ok := query["businessType"]; ok && v != "" {
|
||||
conditions = append(conditions, "business_type = ?")
|
||||
@@ -77,7 +76,7 @@ func (r *SysLogOperateImpl) SelectSysLogOperatePage(query map[string]any) map[st
|
||||
}
|
||||
if v, ok := query["operName"]; ok && v != "" {
|
||||
conditions = append(conditions, "oper_name like concat(?, '%')")
|
||||
params = append(params, v)
|
||||
params = append(params, strings.TrimSpace(v.(string)))
|
||||
}
|
||||
if v, ok := query["status"]; ok && v != "" {
|
||||
conditions = append(conditions, "status = ?")
|
||||
@@ -89,8 +88,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_HH_MM_SS)
|
||||
params = append(params, beginDate.UnixMilli())
|
||||
params = append(params, parse.Number(beginTime.(string)))
|
||||
}
|
||||
endTime, ok := query["endTime"]
|
||||
if !ok {
|
||||
@@ -98,8 +96,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_HH_MM_SS)
|
||||
params = append(params, endDate.UnixMilli())
|
||||
params = append(params, parse.Number(endTime.(string)))
|
||||
}
|
||||
|
||||
// 构建查询条件语句
|
||||
|
||||
Reference in New Issue
Block a user