From 0e186679f4e6f9bd2daa675891b5d6ca145c83ca Mon Sep 17 00:00:00 2001 From: klausY Date: Sat, 21 Sep 2019 22:56:23 +0800 Subject: [PATCH] =?UTF-8?q?swagger=20=E6=96=87=E6=A1=A3=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QMPlusServer/controller/api/menu.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/QMPlusServer/controller/api/menu.go b/QMPlusServer/controller/api/menu.go index b935a3b2..4386ef76 100644 --- a/QMPlusServer/controller/api/menu.go +++ b/QMPlusServer/controller/api/menu.go @@ -43,7 +43,7 @@ func GetMenuList(c *gin.Context) { servers.ReportFormat(c, false, fmt.Sprintf("获取数据失败,%v", err), gin.H{}) } else { servers.ReportFormat(c, true, "获取数据成功", gin.H{ - "list": menuList, + "list": menuList, "total": total, "page": pageInfo.Page, "pageSize": pageInfo.PageSize, @@ -96,7 +96,7 @@ type AddMenuAuthorityInfo struct { // @Security ApiKeyAuth // @accept application/json // @Produce application/json -// @Param data body modelInterface.AddMenuAuthorityInfo true "增加menu和角色关联关系" +// @Param data body api.AddMenuAuthorityInfo true "增加menu和角色关联关系" // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" // @Router /menu/addMenuAuthority [post] func AddMenuAuthority(c *gin.Context) { @@ -119,7 +119,7 @@ type AuthorityIdInfo struct { // @Security ApiKeyAuth // @accept application/json // @Produce application/json -// @Param data body modelInterface.AuthorityIdInfo true "增加menu和角色关联关系" +// @Param data body api.AuthorityIdInfo true "增加menu和角色关联关系" // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" // @Router /menu/addMenuAuthority [post] func GetMenuAuthority(c *gin.Context) { @@ -133,25 +133,25 @@ func GetMenuAuthority(c *gin.Context) { } } - type IdInfo struct { Id float64 } + // @Tags menu // @Summary 获取指定角色menu // @Security ApiKeyAuth // @accept application/json // @Produce application/json -// @Param data body modelInterface.IdInfo true "删除菜单" +// @Param data body api.IdInfo true "删除菜单" // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}" // @Router /menu/deleteBaseMenu [post] func DeleteBaseMenu(c *gin.Context) { var idInfo IdInfo _ = c.BindJSON(&idInfo) - err :=new(dbModel.BaseMenu).DeleteBaseMenu(idInfo.Id) + err := new(dbModel.BaseMenu).DeleteBaseMenu(idInfo.Id) if err != nil { servers.ReportFormat(c, false, fmt.Sprintf("删除失败:%v", err), gin.H{}) } else { servers.ReportFormat(c, true, "删除成功", gin.H{}) } -} \ No newline at end of file +} -- GitLab