Merge branch 'main' of http://192.168.2.166:3180/OMC/ems_backend
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/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)))
|
||||
}
|
||||
|
||||
// 构建查询条件语句
|
||||
|
||||
@@ -7,7 +7,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"
|
||||
@@ -79,8 +78,7 @@ func (r *SysConfigImpl) SelectConfigPage(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 {
|
||||
@@ -88,8 +86,7 @@ func (r *SysConfigImpl) SelectConfigPage(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)))
|
||||
}
|
||||
|
||||
// 构建查询条件语句
|
||||
|
||||
@@ -7,7 +7,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"
|
||||
@@ -78,8 +77,7 @@ func (r *SysDictTypeImpl) SelectDictTypePage(query map[string]any) map[string]an
|
||||
}
|
||||
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 {
|
||||
@@ -87,8 +85,7 @@ func (r *SysDictTypeImpl) SelectDictTypePage(query map[string]any) map[string]an
|
||||
}
|
||||
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)))
|
||||
}
|
||||
|
||||
// 构建查询条件语句
|
||||
|
||||
@@ -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"
|
||||
@@ -76,8 +75,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_HH_MM_SS)
|
||||
params = append(params, beginDate.UnixMilli())
|
||||
params = append(params, parse.Number(beginTime.(string)))
|
||||
}
|
||||
endTime, ok := query["endTime"]
|
||||
if !ok {
|
||||
@@ -85,8 +83,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_HH_MM_SS)
|
||||
params = append(params, endDate.UnixMilli())
|
||||
params = append(params, parse.Number(endTime.(string)))
|
||||
}
|
||||
|
||||
// 构建查询条件语句
|
||||
|
||||
@@ -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"
|
||||
@@ -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)))
|
||||
}
|
||||
|
||||
// 构建查询条件语句
|
||||
|
||||
@@ -7,7 +7,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"
|
||||
@@ -91,8 +90,7 @@ func (r *SysRoleImpl) SelectRolePage(query map[string]any, dataScopeSQL string)
|
||||
}
|
||||
if ok && beginTime != "" {
|
||||
conditions = append(conditions, "r.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 {
|
||||
@@ -100,8 +98,7 @@ func (r *SysRoleImpl) SelectRolePage(query map[string]any, dataScopeSQL string)
|
||||
}
|
||||
if ok && endTime != "" {
|
||||
conditions = append(conditions, "r.create_time <= ?")
|
||||
endDate := date.ParseStrToDate(endTime.(string), date.YYYY_MM_DD)
|
||||
params = append(params, endDate.UnixMilli())
|
||||
params = append(params, parse.Number(endTime.(string)))
|
||||
}
|
||||
if v, ok := query["deptId"]; ok && v != "" {
|
||||
conditions = append(conditions, `(u.dept_id = ? or u.dept_id in (
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
"be.ems/src/framework/datasource"
|
||||
"be.ems/src/framework/logger"
|
||||
"be.ems/src/framework/utils/crypto"
|
||||
"be.ems/src/framework/utils/date"
|
||||
"be.ems/src/framework/utils/parse"
|
||||
"be.ems/src/framework/utils/repo"
|
||||
"be.ems/src/modules/system/model"
|
||||
@@ -156,8 +155,7 @@ func (r *SysUserImpl) SelectUserPage(query map[string]any, dataScopeSQL string)
|
||||
}
|
||||
if ok && beginTime != "" {
|
||||
conditions = append(conditions, "u.login_date >= ?")
|
||||
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 {
|
||||
@@ -165,8 +163,7 @@ func (r *SysUserImpl) SelectUserPage(query map[string]any, dataScopeSQL string)
|
||||
}
|
||||
if ok && endTime != "" {
|
||||
conditions = append(conditions, "u.login_date <= ?")
|
||||
endDate := date.ParseStrToDate(endTime.(string), date.YYYY_MM_DD)
|
||||
params = append(params, endDate.UnixMilli())
|
||||
params = append(params, parse.Number(endTime.(string)))
|
||||
}
|
||||
if v, ok := query["deptId"]; ok && v != "" {
|
||||
conditions = append(conditions, "(u.dept_id = ? or u.dept_id in ( select t.dept_id from sys_dept t where find_in_set(?, ancestors) ))")
|
||||
|
||||
Reference in New Issue
Block a user