multi-tenant
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user