multi-tenant

This commit is contained in:
simonzhangsz committed 2024-06-19 11:15:39 +08:00
1 parent b9c9734b16
commit 7a785182b7
9 files changed
+247 -55

No files matched your search

+3 -3
View File
@@ -1286,9 +1286,9 @@ func XormGetColStringArrayByWhere(table, coln, where string, colv *[]string) err
func XormFindColStringArrayByWhere(table, col, where string, cols *[]string) error {
log.Debug("XormFindColStringArrayByWhere processing... ")
err := xEngine.Table(table).Where(where).Cols(col).Distinct().Find(cols)
err := xEngine.Table(table).Where(where).Cols(col).Find(cols)
if err != nil {
log.Errorf("Failed to Find %s from table %s:%v", col, table, err)
log.Errorf("Failed to find %s from table %s: %v", col, table, err)
return err
}
return nil
@@ -1300,7 +1300,7 @@ func XormGetSingleColStringByWhere(table, col, where string) (string, error) {
var colv string
_, err := xEngine.Table(table).Where(where).Cols(col).Get(&colv)
if err != nil {
log.Errorf("Failed to Find %s from table %s:%v", col, table, err)
log.Errorf("Failed to find %s from table %s: %v", col, table, err)
return colv, err
}
return colv, nil
+9
View File
@@ -726,3 +726,12 @@ func RecurseStructToMap(obj any) map[string]any {
}
return out
}
func IsMember(target string, group []string) bool {
for _, str := range group {
if target == str {
return true
}
}
return false
}
+1 -1
View File
@@ -269,7 +269,7 @@ func init() {
Register("GET", ue.UriUENum, ue.GetUENumFromNF, nil)
Register("GET", ue.CustomUriUENum, ue.GetUENumFromNF, nil)
// NBInfo
// AMF NBInfo
Register("GET", ue.UriNBInfo, ue.GetNBInfoFromNF, nil)
Register("GET", ue.CustomUriNBInfo, ue.GetNBInfoFromNF, nil)