fix: reload after batch add or del
This commit is contained in:
@@ -146,6 +146,9 @@ func (s *IMSUserController) Add(c *gin.Context) {
|
||||
// 命令ok时
|
||||
if strings.Contains(data, "ok") {
|
||||
body.NeId = neId
|
||||
if body.Tag == model.TAG_VoIP {
|
||||
body.IMSI = body.MSISDN
|
||||
}
|
||||
s.imsUserService.Insert(neId, body)
|
||||
}
|
||||
c.JSON(200, result.OkData(data))
|
||||
@@ -194,7 +197,11 @@ func (s *IMSUserController) Adds(c *gin.Context) {
|
||||
}
|
||||
// 命令ok时
|
||||
if strings.Contains(data, "ok") {
|
||||
s.imsUserService.LoadData(neId, body.IMSI, num)
|
||||
if body.Tag == model.TAG_VoIP {
|
||||
s.imsUserService.LoadData(neId, body.MSISDN, num)
|
||||
} else {
|
||||
s.imsUserService.LoadData(neId, body.IMSI, num)
|
||||
}
|
||||
}
|
||||
c.JSON(200, result.OkData(data))
|
||||
}
|
||||
|
||||
@@ -182,8 +182,7 @@ func (s *VoIPAuthController) Adds(c *gin.Context) {
|
||||
defer telnetClient.Close()
|
||||
|
||||
// 发送MML
|
||||
cmd := fmt.Sprintf("baa voip:start_username=%s,password=%s,sub_num=%s,",
|
||||
body.UserName, body.Password, num)
|
||||
cmd := fmt.Sprintf("baa voip:start_username=%s,sub_num=%s,", body.UserName, num)
|
||||
cmd += s.voipAuthService.ParseCommandParams(body)
|
||||
data, err := telnet.ConvertToStr(telnetClient, cmd)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user