fix: UDM签约设置static_ip字段
This commit is contained in:
@@ -812,6 +812,7 @@ func (s *UdmUserApi) UdmSubUserEdit(w http.ResponseWriter, r *http.Request) {
|
|||||||
if body.SmData != "" {
|
if body.SmData != "" {
|
||||||
msg += fmt.Sprintf(",sm_data=%s", body.SmData)
|
msg += fmt.Sprintf(",sm_data=%s", body.SmData)
|
||||||
}
|
}
|
||||||
|
msg += fmt.Sprintf(",static_ip=%s", body.StaticIp)
|
||||||
|
|
||||||
// 发送MML
|
// 发送MML
|
||||||
data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg)
|
data, err := mmlclient.MMLSendMsgToString(neInfo.Ip, msg)
|
||||||
|
|||||||
@@ -291,6 +291,7 @@ func (r *RepoUdmSubUser) Update(neID string, authUser model.UdmSubUser) int64 {
|
|||||||
if authUser.EpsDat != "" && authUser.EpsDat != user.EpsDat {
|
if authUser.EpsDat != "" && authUser.EpsDat != user.EpsDat {
|
||||||
user.EpsDat = authUser.EpsDat
|
user.EpsDat = authUser.EpsDat
|
||||||
}
|
}
|
||||||
|
user.StaticIp = authUser.StaticIp
|
||||||
|
|
||||||
results, err := datasource.DefaultDB().Table("u_sub_user").Where("imsi = ? and ne_id = ?", user.Imsi, user.NeID).Update(user)
|
results, err := datasource.DefaultDB().Table("u_sub_user").Where("imsi = ? and ne_id = ?", user.Imsi, user.NeID).Update(user)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user