|
@@ -5,8 +5,8 @@ import (
|
|
|
"github.com/gin-gonic/gin"
|
|
|
"main/controller/servers"
|
|
|
"main/middleware"
|
|
|
- "main/model/sysModel"
|
|
|
"main/model/modelInterface"
|
|
|
+ "main/model/sysModel"
|
|
|
)
|
|
|
|
|
|
// @Tags authorityAndMenu
|
|
@@ -14,7 +14,7 @@ import (
|
|
|
// @Security ApiKeyAuth
|
|
|
// @Produce application/json
|
|
|
// @Param data body api.RegistAndLoginStuct true "可以什么都不填"
|
|
|
-// @Success 200 {string} json "{"success":true,"data":{},"msg":"返回成功"}"
|
|
|
+// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
|
|
|
// @Router /menu/getMenu [post]
|
|
|
func GetMenu(c *gin.Context) {
|
|
|
claims, _ := c.Get("claims")
|
|
@@ -33,7 +33,7 @@ func GetMenu(c *gin.Context) {
|
|
|
// @accept application/json
|
|
|
// @Produce application/json
|
|
|
// @Param data body modelInterface.PageInfo true "分页获取基础menu列表"
|
|
|
-// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
+// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
// @Router /menu/getMenuList [post]
|
|
|
func GetMenuList(c *gin.Context) {
|
|
|
var pageInfo modelInterface.PageInfo
|
|
@@ -57,7 +57,7 @@ func GetMenuList(c *gin.Context) {
|
|
|
// @accept application/json
|
|
|
// @Produce application/json
|
|
|
// @Param data body sysModel.SysBaseMenu true "新增菜单"
|
|
|
-// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
+// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
// @Router /menu/addBaseMenu [post]
|
|
|
func AddBaseMenu(c *gin.Context) {
|
|
|
var addMenu sysModel.SysBaseMenu
|
|
@@ -75,7 +75,7 @@ func AddBaseMenu(c *gin.Context) {
|
|
|
// @Security ApiKeyAuth
|
|
|
// @Produce application/json
|
|
|
// @Param data body api.RegistAndLoginStuct true "可以什么都不填"
|
|
|
-// @Success 200 {string} json "{"success":true,"data":{},"msg":"返回成功"}"
|
|
|
+// @Success 200 {string} string "{"success":true,"data":{},"msg":"返回成功"}"
|
|
|
// @Router /menu/getBaseMenuTree [post]
|
|
|
func GetBaseMenuTree(c *gin.Context) {
|
|
|
err, menus := new(sysModel.SysBaseMenu).GetBaseMenuTree()
|
|
@@ -97,7 +97,7 @@ type AddMenuAuthorityInfo struct {
|
|
|
// @accept application/json
|
|
|
// @Produce application/json
|
|
|
// @Param data body api.AddMenuAuthorityInfo true "增加menu和角色关联关系"
|
|
|
-// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
+// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
// @Router /menu/addMenuAuthority [post]
|
|
|
func AddMenuAuthority(c *gin.Context) {
|
|
|
var addMenuAuthorityInfo AddMenuAuthorityInfo
|
|
@@ -120,7 +120,7 @@ type AuthorityIdInfo struct {
|
|
|
// @accept application/json
|
|
|
// @Produce application/json
|
|
|
// @Param data body api.AuthorityIdInfo true "增加menu和角色关联关系"
|
|
|
-// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
+// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
// @Router /menu/addMenuAuthority [post]
|
|
|
func GetMenuAuthority(c *gin.Context) {
|
|
|
var authorityIdInfo AuthorityIdInfo
|
|
@@ -143,7 +143,7 @@ type IdInfo struct {
|
|
|
// @accept application/json
|
|
|
// @Produce application/json
|
|
|
// @Param data body api.IdInfo true "删除菜单"
|
|
|
-// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
+// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
// @Router /menu/deleteBaseMenu [post]
|
|
|
func DeleteBaseMenu(c *gin.Context) {
|
|
|
var idInfo IdInfo
|
|
@@ -162,7 +162,7 @@ func DeleteBaseMenu(c *gin.Context) {
|
|
|
// @accept application/json
|
|
|
// @Produce application/json
|
|
|
// @Param data body sysModel.SysBaseMenu true "更新菜单"
|
|
|
-// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
+// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
// @Router /menu/updataBaseMen [post]
|
|
|
func UpdataBaseMenu(c *gin.Context) {
|
|
|
var menu sysModel.SysBaseMenu
|
|
@@ -185,7 +185,7 @@ type GetById struct {
|
|
|
// @accept application/json
|
|
|
// @Produce application/json
|
|
|
// @Param data body api.GetById true "根据id获取菜单"
|
|
|
-// @Success 200 {string} json "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
+// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
|
|
// @Router /menu/getBaseMenuById [post]
|
|
|
func GetBaseMenuById(c *gin.Context) {
|
|
|
var idInfo GetById
|