mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-10 17:13:30 +08:00
parent
68922676fc
commit
3339ba9bad
1 changed files with 2 additions and 3 deletions
|
@ -96,10 +96,9 @@ func OperationLog() gin.HandlerFunc {
|
||||||
if funcs.InputValue == key {
|
if funcs.InputValue == key {
|
||||||
var names []string
|
var names []string
|
||||||
if funcs.IsList {
|
if funcs.IsList {
|
||||||
sql := fmt.Sprintf("SELECT %s FROM %s where %s in (?);", funcs.OutputColumn, funcs.DB, funcs.InputColumn)
|
_ = global.DB.Raw("select ? from ? where ? in (?);", funcs.OutputColumn, funcs.DB, funcs.InputColumn, value).Scan(&names)
|
||||||
_ = global.DB.Raw(sql, value).Scan(&names)
|
|
||||||
} else {
|
} else {
|
||||||
_ = global.DB.Raw(fmt.Sprintf("select %s from %s where %s = ?;", funcs.OutputColumn, funcs.DB, funcs.InputColumn), value).Scan(&names)
|
_ = global.DB.Raw("select ? from ? where ? = ?;", funcs.OutputColumn, funcs.DB, funcs.InputColumn, value).Scan(&names)
|
||||||
}
|
}
|
||||||
formatMap[funcs.OutputValue] = strings.Join(names, ",")
|
formatMap[funcs.OutputValue] = strings.Join(names, ",")
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue