merge: 合并代码20241211
This commit is contained in:
1 parent
aedea2ce2d
commit
1fa9442c1f
43 files changed
+885
-479
No files matched your search
@@ -55,8 +55,8 @@ func (s *UDMAuthController) ResetData(c *gin.Context) {
|
||||
// GET /list
|
||||
func (s *UDMAuthController) List(c *gin.Context) {
|
||||
querys := ctx.QueryMap(c)
|
||||
data := s.udmAuthService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(data))
|
||||
total, rows := s.udmAuthService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(map[string]any{"total": total, "rows": rows}))
|
||||
}
|
||||
|
||||
// UDM鉴权用户信息
|
||||
@@ -364,13 +364,12 @@ func (s *UDMAuthController) Export(c *gin.Context) {
|
||||
|
||||
querys["pageNum"] = 1
|
||||
querys["pageSize"] = 10000
|
||||
data := s.udmAuthService.SelectPage(querys)
|
||||
if parse.Number(data["total"]) == 0 {
|
||||
total, rows := s.udmAuthService.SelectPage(querys)
|
||||
if total == 0 {
|
||||
// 导出数据记录为空
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.exportEmpty")))
|
||||
return
|
||||
}
|
||||
rows := data["rows"].([]model.UDMAuthUser)
|
||||
|
||||
// rows := s.udmAuthService.SelectList(model.UDMAuthUser{NeId: neId})
|
||||
if len(rows) <= 0 {
|
||||
|
||||
@@ -54,8 +54,8 @@ func (s *UDMSubController) ResetData(c *gin.Context) {
|
||||
// GET /list
|
||||
func (s *UDMSubController) List(c *gin.Context) {
|
||||
querys := ctx.QueryMap(c)
|
||||
data := s.udmSubService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(data))
|
||||
total, rows := s.udmSubService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(map[string]any{"total": total, "rows": rows}))
|
||||
}
|
||||
|
||||
// UDM签约用户信息
|
||||
@@ -188,10 +188,9 @@ func (s *UDMSubController) Adds(c *gin.Context) {
|
||||
// 发送MML
|
||||
cmd := fmt.Sprintf("baa udmuser:start_imsi=%s,start_msisdn=%s,sub_num=%s,", body.IMSI, body.MSISDN, num)
|
||||
cmd += s.udmSubService.ParseCommandParams(body)
|
||||
// static_ip指给4G UE分配的静态IP,没有可不带此字段名,批量添加IP会自动递增
|
||||
if body.StaticIp != "" {
|
||||
cmd += fmt.Sprintf(",static_ip=%s", body.StaticIp)
|
||||
}
|
||||
// 去除msisdn参数,避免重复
|
||||
omemsisdn := fmt.Sprintf(",msisdn=%s,", body.MSISDN)
|
||||
cmd = strings.Replace(cmd, omemsisdn, ",", 1)
|
||||
data, err := telnet.ConvertToStr(telnetClient, cmd)
|
||||
if err != nil {
|
||||
c.JSON(200, result.ErrMsg(err.Error()))
|
||||
@@ -369,13 +368,12 @@ func (s *UDMSubController) Export(c *gin.Context) {
|
||||
|
||||
querys["pageNum"] = 1
|
||||
querys["pageSize"] = 10000
|
||||
data := s.udmSubService.SelectPage(querys)
|
||||
if parse.Number(data["total"]) == 0 {
|
||||
total, rows := s.udmSubService.SelectPage(querys)
|
||||
if total == 0 {
|
||||
// 导出数据记录为空
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.exportEmpty")))
|
||||
return
|
||||
}
|
||||
rows := data["rows"].([]model.UDMSubUser)
|
||||
|
||||
// rows := s.udmSubService.SelectList(model.UDMSubUser{NeId: neId})
|
||||
if len(rows) <= 0 {
|
||||
|
||||
Reference in new issue
Block a user