fix: UE事件查询方式调整
This commit is contained in:
@@ -56,8 +56,8 @@ func (s *AMFController) UEList(c *gin.Context) {
|
||||
// querys.RmUID = neInfo.RmUID
|
||||
|
||||
// 查询数据
|
||||
data := s.ueEventService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(data))
|
||||
rows, total := s.ueEventService.SelectPage(querys)
|
||||
c.JSON(200, result.Ok(map[string]any{"rows": rows, "total": total}))
|
||||
}
|
||||
|
||||
// UE会话删除
|
||||
@@ -101,13 +101,12 @@ func (s *AMFController) UEExport(c *gin.Context) {
|
||||
if querys.PageSize > 10000 {
|
||||
querys.PageSize = 10000
|
||||
}
|
||||
data := s.ueEventService.SelectPage(querys)
|
||||
if parse.Number(data["total"]) == 0 {
|
||||
rows, total := s.ueEventService.SelectPage(querys)
|
||||
if total == 0 {
|
||||
// 导出数据记录为空
|
||||
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.exportEmpty")))
|
||||
return
|
||||
}
|
||||
rows := data["rows"].([]model.UEEventAMF)
|
||||
|
||||
// 导出文件名称
|
||||
fileName := fmt.Sprintf("amf_ue_event_export_%d_%d.xlsx", len(rows), time.Now().UnixMilli())
|
||||
|
||||
Reference in New Issue
Block a user