优化用户信息接口和新增neId字段
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
// 实例化数据层 RepoUdmAuthUser 结构体
|
||||
var NewRepoUdmAuthUser = &RepoUdmAuthUser{
|
||||
selectSql: `select
|
||||
id, msisdn, imsi, amf, status, ki, algo_index, opc
|
||||
id, msisdn, imsi, amf, status, ki, algo_index, opc, ne_id
|
||||
from u_auth_user`,
|
||||
|
||||
resultMap: map[string]string{
|
||||
@@ -24,6 +24,7 @@ var NewRepoUdmAuthUser = &RepoUdmAuthUser{
|
||||
"ki": "Ki",
|
||||
"algo_index": "AlgoLndex",
|
||||
"opc": "Opc",
|
||||
"ne_id": "NeID",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -59,6 +60,10 @@ func (r *RepoUdmAuthUser) SelectPage(query map[string]any) map[string]any {
|
||||
conditions = append(conditions, "msisdn like concat(?, '%')")
|
||||
params = append(params, v)
|
||||
}
|
||||
if v, ok := query["neId"]; ok && v != "" {
|
||||
conditions = append(conditions, "ne_id = ?")
|
||||
params = append(params, v)
|
||||
}
|
||||
|
||||
// 构建查询条件语句
|
||||
whereSql := ""
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
// 实例化数据层 RepoUdmSubUser 结构体
|
||||
var NewRepoUdmSubUser = &RepoUdmSubUser{
|
||||
selectSql: `select
|
||||
id, msisdn, imsi, sub_ue_ambr_temp, sub_snssai_temp, rai, forbidden_areas_temp, service_area_restrict_temp, cn_type, sub_data, eps
|
||||
id, msisdn, imsi, sub_ue_ambr_temp, sub_snssai_temp, rai, forbidden_areas_temp, service_area_restrict_temp, cn_type, sub_data, eps, ne_id
|
||||
from u_sub_user`,
|
||||
|
||||
resultMap: map[string]string{
|
||||
@@ -27,6 +27,7 @@ var NewRepoUdmSubUser = &RepoUdmSubUser{
|
||||
"cn_type": "CnType",
|
||||
"sub_data": "SubData",
|
||||
"eps": "Eps",
|
||||
"ne_id": "NeID",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -66,6 +67,10 @@ func (r *RepoUdmSubUser) SelectPage(query map[string]any) map[string]any {
|
||||
conditions = append(conditions, "imsi like concat(?, '%')")
|
||||
params = append(params, v)
|
||||
}
|
||||
if v, ok := query["neId"]; ok && v != "" {
|
||||
conditions = append(conditions, "ne_id = ?")
|
||||
params = append(params, v)
|
||||
}
|
||||
|
||||
// 构建查询条件语句
|
||||
whereSql := ""
|
||||
|
||||
Reference in New Issue
Block a user