menu和authority修改父级变为选择模式
This commit is contained in:
@@ -49,6 +49,25 @@ func DeleteAuthority(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// @Tags authority
|
||||
// @Summary 设置角色资源权限
|
||||
// @Security ApiKeyAuth
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body model.SysAuthority true "设置角色资源权限"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"设置成功"}"
|
||||
// @Router /authority/updateAuthority [post]
|
||||
func UpdateAuthority(c *gin.Context) {
|
||||
var auth model.SysAuthority
|
||||
_ = c.ShouldBindJSON(&auth)
|
||||
err, authority := service.UpdateAuthority(auth)
|
||||
if err != nil {
|
||||
response.FailWithMessage(fmt.Sprintf("更新失败,%v", err), c)
|
||||
} else {
|
||||
response.OkWithData(resp.SysAuthorityResponse{authority}, c)
|
||||
}
|
||||
}
|
||||
|
||||
// @Tags authority
|
||||
// @Summary 分页获取角色列表
|
||||
// @Security ApiKeyAuth
|
||||
|
@@ -84,7 +84,6 @@ func GetBaseMenuTree(c *gin.Context) {
|
||||
response.FailWithMessage(fmt.Sprintf("获取失败,%v", err), c)
|
||||
} else {
|
||||
response.OkWithData(resp.SysBaseMenusResponse{Menus: menus}, c)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user