feat: 新增mme的用户事件查询接口
This commit is contained in:
@@ -2,7 +2,7 @@ package service
|
||||
|
||||
import "be.ems/src/modules/network_data/model"
|
||||
|
||||
// UE会话事件 服务层接口
|
||||
// UE会话事件AMF 服务层接口
|
||||
type IUEEventAMF interface {
|
||||
// SelectPage 根据条件分页查询
|
||||
SelectPage(querys model.UEEventAMFQuery) map[string]any
|
||||
|
||||
@@ -7,24 +7,24 @@ import (
|
||||
"be.ems/src/modules/network_data/repository"
|
||||
)
|
||||
|
||||
// 实例化数据层 UEEventAMFImpl 结构体
|
||||
var NewUEEventAMFImpl = &UEEventAMFImpl{
|
||||
ueEventRepository: repository.NewUEEventAMFImpl,
|
||||
// 实例化数据层 UEEventMMEImpl 结构体
|
||||
var NewUEEventMMEImpl = &UEEventMMEImpl{
|
||||
ueEventRepository: repository.NewUEEventMMEImpl,
|
||||
}
|
||||
|
||||
// UEEventAMFImpl UE会话事件 服务层处理
|
||||
type UEEventAMFImpl struct {
|
||||
// UEEventMMEImpl UE会话事件MME 服务层处理
|
||||
type UEEventMMEImpl struct {
|
||||
// UE会话事件数据信息
|
||||
ueEventRepository repository.IUEEventAMF
|
||||
ueEventRepository repository.IUEEventMME
|
||||
}
|
||||
|
||||
// SelectPage 根据条件分页查询
|
||||
func (r *UEEventAMFImpl) SelectPage(querys model.UEEventAMFQuery) map[string]any {
|
||||
func (r *UEEventMMEImpl) SelectPage(querys model.UEEventMMEQuery) map[string]any {
|
||||
return r.ueEventRepository.SelectPage(querys)
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
func (r *UEEventAMFImpl) DeleteByIds(ueIds []string) (int64, error) {
|
||||
func (r *UEEventMMEImpl) DeleteByIds(ueIds []string) (int64, error) {
|
||||
// 检查是否存在
|
||||
ids := r.ueEventRepository.SelectByIds(ueIds)
|
||||
if len(ids) <= 0 {
|
||||
|
||||
12
src/modules/network_data/service/ue_event_mme.go
Normal file
12
src/modules/network_data/service/ue_event_mme.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package service
|
||||
|
||||
import "be.ems/src/modules/network_data/model"
|
||||
|
||||
// UE会话事件MME 服务层接口
|
||||
type IUEEventMME interface {
|
||||
// SelectPage 根据条件分页查询
|
||||
SelectPage(querys model.UEEventMMEQuery) map[string]any
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
DeleteByIds(ueIds []string) (int64, error)
|
||||
}
|
||||
40
src/modules/network_data/service/ue_event_mme.impl.go
Normal file
40
src/modules/network_data/service/ue_event_mme.impl.go
Normal file
@@ -0,0 +1,40 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"be.ems/src/modules/network_data/model"
|
||||
"be.ems/src/modules/network_data/repository"
|
||||
)
|
||||
|
||||
// 实例化数据层 UEEventAMFImpl 结构体
|
||||
var NewUEEventAMFImpl = &UEEventAMFImpl{
|
||||
ueEventRepository: repository.NewUEEventAMFImpl,
|
||||
}
|
||||
|
||||
// UEEventAMFImpl UE会话事件AMF 服务层处理
|
||||
type UEEventAMFImpl struct {
|
||||
// UE会话事件数据信息
|
||||
ueEventRepository repository.IUEEventAMF
|
||||
}
|
||||
|
||||
// SelectPage 根据条件分页查询
|
||||
func (r *UEEventAMFImpl) SelectPage(querys model.UEEventAMFQuery) map[string]any {
|
||||
return r.ueEventRepository.SelectPage(querys)
|
||||
}
|
||||
|
||||
// DeleteByIds 批量删除信息
|
||||
func (r *UEEventAMFImpl) DeleteByIds(ueIds []string) (int64, error) {
|
||||
// 检查是否存在
|
||||
ids := r.ueEventRepository.SelectByIds(ueIds)
|
||||
if len(ids) <= 0 {
|
||||
return 0, fmt.Errorf("no data")
|
||||
}
|
||||
|
||||
if len(ids) == len(ueIds) {
|
||||
rows := r.ueEventRepository.DeleteByIds(ueIds)
|
||||
return rows, nil
|
||||
}
|
||||
// 删除信息失败!
|
||||
return 0, fmt.Errorf("delete fail")
|
||||
}
|
||||
Reference in New Issue
Block a user