ref: v3变更,,表结构变更coreId/neId

This commit is contained in:
TsMask
2025-09-15 11:00:34 +08:00
parent 60004ded55
commit 38d2e2372a
193 changed files with 3255 additions and 3878 deletions

View File

@@ -51,24 +51,19 @@ type SGWCController struct {
func (s *SGWCController) CDRList(c *gin.Context) {
language := reqctx.AcceptLanguage(c)
query := reqctx.QueryMap(c)
// 限制导出数据集
pageSize := parse.Number(query["pageSize"])
if pageSize > 10000 {
query["pageSize"] = "10000"
}
coreUid := c.DefaultQuery("coreUid", "")
neUid := c.DefaultQuery("neUid", "")
if coreUid == "" || neUid == "" {
c.JSON(422, resp.CodeMsg(resp.CODE_PARAM_CHEACK, "coreUid or neUid is empty"))
if neUid == "" {
c.JSON(422, resp.CodeMsg(resp.CODE_PARAM_CHEACK, "neUid is empty"))
return
}
// 查询网元获取IP
neInfo := s.neInfoService.FindByCoreUidAndNeUid(coreUid, neUid)
if neInfo.CoreUID != coreUid || neInfo.NeUID != neUid {
neInfo := s.neInfoService.FindByNeUid(neUid)
if neInfo.NeUid != neUid {
c.JSON(200, resp.ErrMsg(i18n.TKey(language, "app.common.noNEInfo")))
return
}
query["neId"] = fmt.Sprint(neInfo.ID)
rows, total := s.cdrEventService.FindByPage(neInfo.NeType, query)
c.JSON(200, resp.OkData(map[string]any{"rows": rows, "total": total}))
}
@@ -127,24 +122,19 @@ func (s *SGWCController) CDRRemove(c *gin.Context) {
func (s *SGWCController) CDRExport(c *gin.Context) {
language := reqctx.AcceptLanguage(c)
query := reqctx.QueryMap(c)
// 限制导出数据集
pageSize := parse.Number(query["pageSize"])
if pageSize > 10000 {
query["pageSize"] = "10000"
}
coreUid := c.DefaultQuery("coreUid", "")
neUid := c.DefaultQuery("neUid", "")
if coreUid == "" || neUid == "" {
c.JSON(422, resp.CodeMsg(resp.CODE_PARAM_CHEACK, "coreUid or neUid is empty"))
if neUid == "" {
c.JSON(422, resp.CodeMsg(resp.CODE_PARAM_CHEACK, "neUid is empty"))
return
}
// 查询网元获取IP
neInfo := s.neInfoService.FindByCoreUidAndNeUid(coreUid, neUid)
if neInfo.CoreUID != coreUid || neInfo.NeUID != neUid {
neInfo := s.neInfoService.FindByNeUid(neUid)
if neInfo.NeUid != neUid {
c.JSON(200, resp.ErrMsg(i18n.TKey(language, "app.common.noNEInfo")))
return
}
query["neId"] = fmt.Sprint(neInfo.ID)
rows, total := s.cdrEventService.FindByPage(neInfo.NeType, query)
if total == 0 {
// 导出数据记录为空