feat(userlist): enhance GetServerUserListLogic with improved node and tag handling

This commit is contained in:
Chang lue Tsen
2025-09-04 13:46:24 -04:00
parent 805fca90e0
commit 61ac829c37
3 changed files with 36 additions and 6 deletions
+4 -4
View File
@@ -147,14 +147,14 @@ func InSet(field string, values []string) func(db *gorm.DB) *gorm.DB {
return db
}
conds := db
query := db
for i, v := range values {
if i == 0 {
conds = conds.Where("FIND_IN_SET(?, "+field+")", v)
query = query.Where("FIND_IN_SET(?, "+field+")", v)
} else {
conds = conds.Or("FIND_IN_SET(?, "+field+")", v)
query = query.Or("FIND_IN_SET(?, "+field+")", v)
}
}
return conds
return query
}
}