feat: UDM鉴权签约imsi多查询

This commit is contained in:
TsMask
2024-10-29 11:02:44 +08:00
parent e260795d3a
commit 88485221a0
2 changed files with 14 additions and 0 deletions

View File

@@ -74,6 +74,13 @@ func (r *UDMAuthUser) SelectPage(query map[string]any) map[string]any {
conditions = append(conditions, "ne_id = ?")
params = append(params, v)
}
if v, ok := query["imsis"]; ok && v != "" {
placeholder := repo.KeyPlaceholderByQuery(len(v.([]any)))
conditions = append(conditions, fmt.Sprintf("imsi in (%s)", placeholder))
for _, v := range v.([]any) {
params = append(params, v.(string))
}
}
// 构建查询条件语句
whereSql := ""

View File

@@ -110,6 +110,13 @@ func (r *UDMSubUser) SelectPage(query map[string]any) map[string]any {
conditions = append(conditions, "ne_id = ?")
params = append(params, v)
}
if v, ok := query["imsis"]; ok && v != "" {
placeholder := repo.KeyPlaceholderByQuery(len(v.([]any)))
conditions = append(conditions, fmt.Sprintf("imsi in (%s)", placeholder))
for _, v := range v.([]any) {
params = append(params, v.(string))
}
}
// 构建查询条件语句
whereSql := ""