feat: swagger接口文档更新1.0.8

This commit is contained in:
TsMask
2025-01-23 15:07:22 +08:00
parent 788e406c32
commit ed9aa17bc3
47 changed files with 16033 additions and 119 deletions

View File

@@ -34,6 +34,20 @@ type MMEController struct {
// UE会话列表
//
// GET /ue/list
//
// @Tags network_data/mme
// @Accept json
// @Produce json
// @Param neType query string true "NE Type only MME" Enums(MME)
// @Param neId query string true "NE ID" default(001)
// @Param imsi query string false "imsi"
// @Param pageNum query number true "pageNum" default(1)
// @Param pageSize query number true "pageSize" default(10)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UE Session List
// @Description UE Session List
// @Router /neData/mme/ue/list [get]
func (s *MMEController) UEList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var querys model.UEEventMMEQuery
@@ -58,6 +72,16 @@ func (s *MMEController) UEList(c *gin.Context) {
// UE会话删除
//
// DELETE /ue/:ueIds
//
// @Tags network_data/mme
// @Accept json
// @Produce json
// @Param ueIds path string true "list data id, multiple separated by a , sign"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UE Session Deletion
// @Description UE Session Deletion
// @Router /neData/mme/ue/{ueIds} [delete]
func (s *MMEController) UERemove(c *gin.Context) {
language := ctx.AcceptLanguage(c)
ueIds := c.Param("ueIds")
@@ -84,6 +108,16 @@ func (s *MMEController) UERemove(c *gin.Context) {
// UE会话列表导出
//
// POST /ue/export
//
// @Tags network_data/mme
// @Accept json
// @Produce json
// @Param data body object true "Request Param"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary UE Session List Export
// @Description UE Session List Export
// @Router /neData/mme/ue/export [post]
func (s *MMEController) UEExport(c *gin.Context) {
language := ctx.AcceptLanguage(c)
// 查询结果,根据查询条件结果,单页最大值限制
@@ -125,6 +159,17 @@ func (s *MMEController) UEExport(c *gin.Context) {
// 接入基站信息列表
//
// GET /nb/list
//
// @Tags network_data/mme
// @Accept json
// @Produce json
// @Param neId query string true "NE ID" default(001)
// @Param id query string false "Base Station ID"
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary Access Base Station Information List
// @Description Access Base Station Information List
// @Router /neData/mme/nb/list [get]
func (s *MMEController) NbInfoList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var query struct {
@@ -154,3 +199,43 @@ func (s *MMEController) NbInfoList(c *gin.Context) {
c.JSON(200, result.OkData(data))
}
// 接入基站状态信息列表
//
// GET /nb/list-cfg
//
// @Tags network_data/mme
// @Accept json
// @Produce json
// @Param neId query string true "NE ID" default(001)
// @Success 200 {object} object "Response Results"
// @Security ApiKeyAuth
// @Summary Access to the base station status information list
// @Description Access to the base station status information list
// @Router /neData/mme/nb/list-cfg [get]
func (s *MMEController) NbStateList(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var query struct {
NeId string `form:"neId" binding:"required"`
}
if err := c.ShouldBindQuery(&query); err != nil {
c.JSON(400, result.CodeMsg(400, i18n.TKey(language, "app.common.err400")))
return
}
// 查询网元信息
neInfo := s.neInfoService.SelectNeInfoByNeTypeAndNeID("MME", query.NeId)
if neInfo.NeId != query.NeId || neInfo.IP == "" {
c.JSON(200, result.ErrMsg(i18n.TKey(language, "app.common.noNEInfo")))
return
}
// 网元直连
data, err := neFetchlink.MMEEnbStateList(neInfo)
if err != nil {
c.JSON(200, result.ErrMsg(err.Error()))
return
}
c.JSON(200, result.OkData(data))
}