Skip to content

Commit 782fc0d

Browse files
author
奇淼(piexlmax
authored
Merge pull request flipped-aurora#626 from flipped-aurora/gva_gormv2_dev
Gva gormv2 dev
2 parents 4655633 + d767c34 commit 782fc0d

File tree

10 files changed

+113
-102
lines changed

10 files changed

+113
-102
lines changed

server/api/v1/system/sys_menu.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (a *AuthorityMenuApi) AddMenuAuthority(c *gin.Context) {
8181
// @Produce application/json
8282
// @Param data body request.GetAuthorityId true "角色ID"
8383
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
84-
// @Router /menu/GetMenuAuthority [post]
84+
// @Router /menu/getMenuAuthority [post]
8585
func (a *AuthorityMenuApi) GetMenuAuthority(c *gin.Context) {
8686
var param request.GetAuthorityId
8787
_ = c.ShouldBindJSON(&param)

server/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,4 @@ Timer:
132132
{ tableName: "sys_operation_records" , compareField: "created_at", interval: "2160h" },
133133
#{ tableName: "log2" , compareField: "created_at", interval: "2160h" }
134134
]
135+

server/config/oss.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type AliyunOSS struct {
2020
AccessKeySecret string `mapstructure:"access-key-secret" json:"accessKeySecret" yaml:"access-key-secret"`
2121
BucketName string `mapstructure:"bucket-name" json:"bucketName" yaml:"bucket-name"`
2222
BucketUrl string `mapstructure:"bucket-url" json:"bucketUrl" yaml:"bucket-url"`
23-
BasePath string `mapstructure:"base-path" json:"basePath" yaml:"base-path"`
23+
BasePath string `mapstructure:"base-path" json:"basePath" yaml:"base-path"`
2424
}
2525
type TencentCOS struct {
2626
Bucket string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`

server/docs/docs.go

Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,9 @@ var doc = `{
15541554
}
15551555
],
15561556
"responses": {
1557-
"200": {}
1557+
"200": {
1558+
"description": ""
1559+
}
15581560
}
15591561
}
15601562
},
@@ -1587,7 +1589,9 @@ var doc = `{
15871589
}
15881590
],
15891591
"responses": {
1590-
"200": {}
1592+
"200": {
1593+
"description": ""
1594+
}
15911595
}
15921596
}
15931597
},
@@ -1944,7 +1948,7 @@ var doc = `{
19441948
}
19451949
}
19461950
},
1947-
"/menu/GetMenuAuthority": {
1951+
"/menu/addBaseMenu": {
19481952
"post": {
19491953
"security": [
19501954
{
@@ -1958,31 +1962,31 @@ var doc = `{
19581962
"application/json"
19591963
],
19601964
"tags": [
1961-
"AuthorityMenu"
1965+
"Menu"
19621966
],
1963-
"summary": "获取指定角色menu",
1967+
"summary": "新增菜单",
19641968
"parameters": [
19651969
{
1966-
"description": "角色ID",
1970+
"description": "路由path, 父菜单ID, 路由name, 对应前端文件路径, 排序标记",
19671971
"name": "data",
19681972
"in": "body",
19691973
"required": true,
19701974
"schema": {
1971-
"$ref": "#/definitions/request.GetAuthorityId"
1975+
"$ref": "#/definitions/system.SysBaseMenu"
19721976
}
19731977
}
19741978
],
19751979
"responses": {
19761980
"200": {
1977-
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
1981+
"description": "{\"success\":true,\"data\":{},\"msg\":\"添加成功\"}",
19781982
"schema": {
19791983
"type": "string"
19801984
}
19811985
}
19821986
}
19831987
}
19841988
},
1985-
"/menu/addBaseMenu": {
1989+
"/menu/addMenuAuthority": {
19861990
"post": {
19871991
"security": [
19881992
{
@@ -1996,17 +2000,17 @@ var doc = `{
19962000
"application/json"
19972001
],
19982002
"tags": [
1999-
"Menu"
2003+
"AuthorityMenu"
20002004
],
2001-
"summary": "新增菜单",
2005+
"summary": "增加menu和角色关联关系",
20022006
"parameters": [
20032007
{
2004-
"description": "路由path, 父菜单ID, 路由name, 对应前端文件路径, 排序标记",
2008+
"description": "角色ID",
20052009
"name": "data",
20062010
"in": "body",
20072011
"required": true,
20082012
"schema": {
2009-
"$ref": "#/definitions/system.SysBaseMenu"
2013+
"$ref": "#/definitions/request.AddMenuAuthorityInfo"
20102014
}
20112015
}
20122016
],
@@ -2020,7 +2024,7 @@ var doc = `{
20202024
}
20212025
}
20222026
},
2023-
"/menu/addMenuAuthority": {
2027+
"/menu/deleteBaseMenu": {
20242028
"post": {
20252029
"security": [
20262030
{
@@ -2034,31 +2038,31 @@ var doc = `{
20342038
"application/json"
20352039
],
20362040
"tags": [
2037-
"AuthorityMenu"
2041+
"Menu"
20382042
],
2039-
"summary": "增加menu和角色关联关系",
2043+
"summary": "删除菜单",
20402044
"parameters": [
20412045
{
2042-
"description": "角色ID",
2046+
"description": "菜单id",
20432047
"name": "data",
20442048
"in": "body",
20452049
"required": true,
20462050
"schema": {
2047-
"$ref": "#/definitions/request.AddMenuAuthorityInfo"
2051+
"$ref": "#/definitions/request.GetById"
20482052
}
20492053
}
20502054
],
20512055
"responses": {
20522056
"200": {
2053-
"description": "{\"success\":true,\"data\":{},\"msg\":\"添加成功\"}",
2057+
"description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}",
20542058
"schema": {
20552059
"type": "string"
20562060
}
20572061
}
20582062
}
20592063
}
20602064
},
2061-
"/menu/deleteBaseMenu": {
2065+
"/menu/getBaseMenuById": {
20622066
"post": {
20632067
"security": [
20642068
{
@@ -2074,7 +2078,7 @@ var doc = `{
20742078
"tags": [
20752079
"Menu"
20762080
],
2077-
"summary": "删除菜单",
2081+
"summary": "根据id获取菜单",
20782082
"parameters": [
20792083
{
20802084
"description": "菜单id",
@@ -2088,39 +2092,36 @@ var doc = `{
20882092
],
20892093
"responses": {
20902094
"200": {
2091-
"description": "{\"success\":true,\"data\":{},\"msg\":\"删除成功\"}",
2095+
"description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
20922096
"schema": {
20932097
"type": "string"
20942098
}
20952099
}
20962100
}
20972101
}
20982102
},
2099-
"/menu/getBaseMenuById": {
2103+
"/menu/getBaseMenuTree": {
21002104
"post": {
21012105
"security": [
21022106
{
21032107
"ApiKeyAuth": []
21042108
}
21052109
],
2106-
"consumes": [
2107-
"application/json"
2108-
],
21092110
"produces": [
21102111
"application/json"
21112112
],
21122113
"tags": [
2113-
"Menu"
2114+
"AuthorityMenu"
21142115
],
2115-
"summary": "根据id获取菜单",
2116+
"summary": "获取用户动态路由",
21162117
"parameters": [
21172118
{
2118-
"description": "菜单id",
2119+
"description": "",
21192120
"name": "data",
21202121
"in": "body",
21212122
"required": true,
21222123
"schema": {
2123-
"$ref": "#/definitions/request.GetById"
2124+
"$ref": "#/definitions/request.Empty"
21242125
}
21252126
}
21262127
],
@@ -2134,7 +2135,7 @@ var doc = `{
21342135
}
21352136
}
21362137
},
2137-
"/menu/getBaseMenuTree": {
2138+
"/menu/getMenu": {
21382139
"post": {
21392140
"security": [
21402141
{
@@ -2169,28 +2170,31 @@ var doc = `{
21692170
}
21702171
}
21712172
},
2172-
"/menu/getMenu": {
2173+
"/menu/getMenuAuthority": {
21732174
"post": {
21742175
"security": [
21752176
{
21762177
"ApiKeyAuth": []
21772178
}
21782179
],
2180+
"consumes": [
2181+
"application/json"
2182+
],
21792183
"produces": [
21802184
"application/json"
21812185
],
21822186
"tags": [
21832187
"AuthorityMenu"
21842188
],
2185-
"summary": "获取用户动态路由",
2189+
"summary": "获取指定角色menu",
21862190
"parameters": [
21872191
{
2188-
"description": "",
2192+
"description": "角色ID",
21892193
"name": "data",
21902194
"in": "body",
21912195
"required": true,
21922196
"schema": {
2193-
"$ref": "#/definitions/request.Empty"
2197+
"$ref": "#/definitions/request.GetAuthorityId"
21942198
}
21952199
}
21962200
],

0 commit comments

Comments
 (0)