提交 0e186679 编写于 作者: K klausY

swagger 文档描述修复

上级 0b146baf
...@@ -43,7 +43,7 @@ func GetMenuList(c *gin.Context) { ...@@ -43,7 +43,7 @@ func GetMenuList(c *gin.Context) {
servers.ReportFormat(c, false, fmt.Sprintf("获取数据失败,%v", err), gin.H{}) servers.ReportFormat(c, false, fmt.Sprintf("获取数据失败,%v", err), gin.H{})
} else { } else {
servers.ReportFormat(c, true, "获取数据成功", gin.H{ servers.ReportFormat(c, true, "获取数据成功", gin.H{
"list": menuList, "list": menuList,
"total": total, "total": total,
"page": pageInfo.Page, "page": pageInfo.Page,
"pageSize": pageInfo.PageSize, "pageSize": pageInfo.PageSize,
...@@ -96,7 +96,7 @@ type AddMenuAuthorityInfo struct { ...@@ -96,7 +96,7 @@ type AddMenuAuthorityInfo struct {
// @Security ApiKeyAuth // @Security ApiKeyAuth
// @accept application/json // @accept application/json
// @Produce 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":"获取成功"}" // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/addMenuAuthority [post] // @Router /menu/addMenuAuthority [post]
func AddMenuAuthority(c *gin.Context) { func AddMenuAuthority(c *gin.Context) {
...@@ -119,7 +119,7 @@ type AuthorityIdInfo struct { ...@@ -119,7 +119,7 @@ type AuthorityIdInfo struct {
// @Security ApiKeyAuth // @Security ApiKeyAuth
// @accept application/json // @accept application/json
// @Produce 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":"获取成功"}" // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/addMenuAuthority [post] // @Router /menu/addMenuAuthority [post]
func GetMenuAuthority(c *gin.Context) { func GetMenuAuthority(c *gin.Context) {
...@@ -133,25 +133,25 @@ func GetMenuAuthority(c *gin.Context) { ...@@ -133,25 +133,25 @@ func GetMenuAuthority(c *gin.Context) {
} }
} }
type IdInfo struct { type IdInfo struct {
Id float64 Id float64
} }
// @Tags menu // @Tags menu
// @Summary 获取指定角色menu // @Summary 获取指定角色menu
// @Security ApiKeyAuth // @Security ApiKeyAuth
// @accept application/json // @accept application/json
// @Produce 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":"获取成功"}" // @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /menu/deleteBaseMenu [post] // @Router /menu/deleteBaseMenu [post]
func DeleteBaseMenu(c *gin.Context) { func DeleteBaseMenu(c *gin.Context) {
var idInfo IdInfo var idInfo IdInfo
_ = c.BindJSON(&idInfo) _ = c.BindJSON(&idInfo)
err :=new(dbModel.BaseMenu).DeleteBaseMenu(idInfo.Id) err := new(dbModel.BaseMenu).DeleteBaseMenu(idInfo.Id)
if err != nil { if err != nil {
servers.ReportFormat(c, false, fmt.Sprintf("删除失败:%v", err), gin.H{}) servers.ReportFormat(c, false, fmt.Sprintf("删除失败:%v", err), gin.H{})
} else { } else {
servers.ReportFormat(c, true, "删除成功", gin.H{}) servers.ReportFormat(c, true, "删除成功", gin.H{})
} }
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册