feat: 更新多个模块以支持新的数据结构和日志格式
This commit is contained in:
33
src/modules/network_data/service/udm_extend.go
Normal file
33
src/modules/network_data/service/udm_extend.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"be.ems/src/modules/network_data/model"
|
||||
"be.ems/src/modules/network_data/repository"
|
||||
)
|
||||
|
||||
// 实例化服务层 UDMExtend 结构体
|
||||
var NewUDMExtend = &UDMExtend{
|
||||
UDMExtendRepository: repository.NewUDMExtend,
|
||||
}
|
||||
|
||||
// UDM用户IMSI拓展信息 服务层处理
|
||||
type UDMExtend struct {
|
||||
// UDM用户IMSI信息数据信息
|
||||
UDMExtendRepository *repository.UDMExtend
|
||||
}
|
||||
|
||||
// FindByIMSIAndNeID 通过IMSI和网元标识查询信息 neId为%时模糊imsi查询
|
||||
func (r UDMExtend) FindByIMSIAndNeID(imsi, neId string) model.UDMExtend {
|
||||
return r.UDMExtendRepository.SelectByIMSIAndNeID(imsi, neId)
|
||||
}
|
||||
|
||||
// Save 新增或修改信息
|
||||
func (r UDMExtend) Save(u model.UDMExtend) bool {
|
||||
r.UDMExtendRepository.Delete(u.IMSI, u.NeId)
|
||||
return r.UDMExtendRepository.Inserts([]model.UDMExtend{u}) > 0
|
||||
}
|
||||
|
||||
// Delete 删除信息 neId为%时模糊imsi查询
|
||||
func (r UDMExtend) Delete(imsi, neId string) int64 {
|
||||
return r.UDMExtendRepository.Delete(imsi, neId)
|
||||
}
|
||||
Reference in New Issue
Block a user