master
wubin 5 years ago
parent b1f6d1f0ca
commit aee80210f9

@ -25,7 +25,7 @@ func ExistMenuCode(menuCode string) (bool, error) {
if err != nil {
return false, err
}
c := list[0]["c"].(int32)
c := list[0]["c"].(int64)
if c == 0 {
return false, nil
} else {

@ -1,7 +1,6 @@
package main
import (
"dsBaseRpc/DataExchange"
"dsBaseRpc/RpcService/BaseClass/BaseClassProto"
"dsBaseRpc/RpcService/BaseClass/BaseClassService"
"dsBaseRpc/RpcService/BaseGlobal/BaseGlobalProto"
@ -128,6 +127,7 @@ func main() {
BaseRoleMenuProto.RegisterBaseRoleMenuManageServer(s, &BaseRoleMenuService.Rpc{})
//五、开启一个数据上报的协程
/*
go func() {
//异常处理
defer func() {
@ -137,6 +137,7 @@ func main() {
}()
DataExchange.DataExchange()
}()
*/
//六、 注册反射服务 这个服务是CLI使用的 跟服务本身没有关系
reflection.Register(s)
//七、启动

@ -93,17 +93,23 @@ func GetMenuInfo(c *gin.Context) {
// @Tags 菜单信息
// @Accept application/x-www-form-urlencoded
// @Produce json
// @Param appId formData string true "系统ID"
// @Param parentId formData string true "父节点ID"
// @Param menuName formData string true "菜单名称"
// @Param menuCode formData string true "菜单编码"
// @Param menuUrl formData string true "菜单的URL"
// @Param menuIcon formData string true "菜单图标"
// @Success 200 {object} Model.Res
// @Router /base/menu/AddMenuInfo [post]
// @X-EmptyLimit ["menuName","menuCode","menuUrl","menuIcon"]
// @X-LengthLimit [{"menuName":"2,50"},{"menuCode":"2,20"},{"menuUrl":"1,500"}]
// @X-EmptyLimit ["appId","parentId","menuName","menuCode","menuUrl","menuIcon"]
// @X-LengthLimit [{"appId":"36,36"},{"parentId":"36,36"},{"menuName":"2,50"},{"menuCode":"2,20"},{"menuUrl":"1,500"}]
// @X-RoleLimit ["1"]
// @X-Sort [3]
func AddMenuInfo(c *gin.Context) {
//系统ID
appId := c.PostForm("appId")
//父节点ID
parentId := c.PostForm("parentId")
//菜单名称
menuName := c.PostForm("menuName")
//菜单编码
@ -113,7 +119,7 @@ func AddMenuInfo(c *gin.Context) {
//菜单图标
menuIcon := c.PostForm("menuIcon")
r, err := BaseMenuService.AddBaseMenuInfo(menuName, menuCode, menuUrl, menuIcon)
r, err := BaseMenuService.AddBaseMenuInfo(appId,parentId,menuName, menuCode, menuUrl, menuIcon)
if err != nil {
c.JSON(http.StatusOK, Model.Res{
Success: false,

@ -15,8 +15,8 @@ func GetBaseMenuInfo(memuId string) (*BaseMenuProto.Reply, error) {
return Reply, err
}
func AddBaseMenuInfo(menuName string, menuCode string, menuUrl string, menuIcon string) (*BaseMenuProto.Reply, error) {
Reply, err := AddBaseMenu(BaseMenuProto.ModelArg{MenuName: menuName, MenuCode: menuCode, MenuUrl: menuUrl, MenuIcon: menuIcon})
func AddBaseMenuInfo(appId string, parentId string, menuName string, menuCode string, menuUrl string, menuIcon string) (*BaseMenuProto.Reply, error) {
Reply, err := AddBaseMenu(BaseMenuProto.ModelArg{AppId: appId, ParentId: parentId, MenuName: menuName, MenuCode: menuCode, MenuUrl: menuUrl, MenuIcon: menuIcon})
return Reply, err
}

@ -3,6 +3,7 @@ package Router
import (
"dsBaseWeb/Business/BaseClass/BaseClassController"
"dsBaseWeb/Business/BaseGlobal/BaseGlobalController"
"dsBaseWeb/Business/BaseMenu/BaseMenuController"
"dsBaseWeb/Business/BaseOrganization/BaseOrganizationController"
"dsBaseWeb/Business/BasePosition/BasePositionController"
"dsBaseWeb/Business/BasePurview/BasePurviewController"
@ -44,4 +45,6 @@ func GinRouter(r *gin.Engine) {
BaseRolePersonController.Routers(rr)
//职务
BasePositionController.Routers(rr)
BaseMenuController.Routers(rr)
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -450,7 +450,7 @@ paths:
in: formData
name: stageId
required: true
type: string
type: integer
- description: 学制
in: formData
name: schoolingLength
@ -615,7 +615,7 @@ paths:
in: query
name: stageId
required: true
type: string
type: integer
produces:
- application/json
responses:
@ -756,7 +756,7 @@ paths:
in: query
name: stageId
required: true
type: string
type: integer
- description: 入学年份
in: query
name: rxnf
@ -1727,6 +1727,248 @@ paths:
summary: 修改登录密码
tags:
- 登录信息
/base/menu/AddMenuInfo:
post:
X-EmptyLimit:
- menuName
- menuCode
- menuUrl
- menuIcon
X-LengthLimit:
- menuName: 2,50
- menuCode: 2,20
- menuUrl: 1,500
X-RoleLimit:
- "1"
X-Sort:
- 3
consumes:
- application/x-www-form-urlencoded
description: 增加菜单信息
parameters:
- description: 菜单名称
in: formData
name: menuName
required: true
type: string
- description: 菜单编码
in: formData
name: menuCode
required: true
type: string
- description: 菜单的URL
in: formData
name: menuUrl
required: true
type: string
- description: 菜单图标
in: formData
name: menuIcon
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 增加菜单信息
tags:
- 菜单信息
/base/menu/DeleteMenuInfo:
post:
X-EmptyLimit:
- menuIds
X-LengthLimit:
- menuIds: 36,1800
X-RoleLimit:
- "1"
X-Sort:
- 4
consumes:
- application/x-www-form-urlencoded
description: 删除菜单信息
parameters:
- description: 菜单ID多个用逗号分隔
in: formData
name: menuIds
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 删除菜单信息
tags:
- 菜单信息
/base/menu/GetMenuInfo:
get:
X-EmptyLimit:
- menuId
X-LengthLimit:
- menuId: 36,36
X-RoleLimit:
- "1"
X-Sort:
- 2
X-TableName:
- t_base_menu
consumes:
- application/x-www-form-urlencoded
description: 根据菜单ID获取该菜单信息
parameters:
- description: 菜单ID
in: query
name: menuId
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 根据菜单ID获取该菜单信息
tags:
- 菜单信息
/base/menu/PageMenuInfo:
get:
X-EmptyLimit:
- appId
- identityId
X-IntRangeLimit:
- identityId: 1,4
X-LengthLimit:
- appId: 36,36
X-RoleLimit:
- "1"
X-Sort:
- 1
X-TableName:
- t_base_menu
consumes:
- application/x-www-form-urlencoded
description: 根据系统ID和身份ID获取菜单信息
parameters:
- description: 系统ID
in: query
name: appId
required: true
type: string
- description: 身份ID
in: query
name: identityId
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 根据系统ID和身份ID获取菜单信息
tags:
- 菜单信息
/base/menu/SetMenuSortInfo:
post:
X-EmptyLimit:
- menuId
- direction
X-IntRangeLimit:
- direction: 1,2
X-LengthLimit:
- menuId: 36,36
X-RoleLimit:
- "1"
X-Sort:
- 6
consumes:
- application/x-www-form-urlencoded
description: 设置菜单排序
parameters:
- description: 菜单ID
in: formData
name: menuId
required: true
type: string
- description: 调整顺序的方向 1:向上 2:向下
in: formData
name: direction
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 设置菜单排序
tags:
- 菜单信息
/base/menu/UpdateMenuInfo:
post:
X-EmptyLimit:
- menuId
- menuName
- menuCode
- menuUrl
- menuIcon
X-LengthLimit:
- menuId: 36,36
- menuName: 36,36
- menuName: 2,50
- menuCode: 2,20
- menuUrl: 1,500
X-RoleLimit:
- "1"
X-Sort:
- 5
consumes:
- application/x-www-form-urlencoded
description: 修改菜单信息
parameters:
- description: 菜单ID
in: formData
name: menuId
required: true
type: string
- description: 菜单名称
in: formData
name: menuName
required: true
type: string
- description: 菜单编码
in: formData
name: menuCode
required: true
type: string
- description: 菜单的URL
in: formData
name: menuUrl
required: true
type: string
- description: 菜单图标
in: formData
name: menuIcon
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 修改菜单信息
tags:
- 菜单信息
/base/organization/AddEduAssistInfo:
post:
X-EmptyLimit:
@ -3912,6 +4154,124 @@ paths:
summary: 修改权限信息
tags:
- 权限
/base/role/AddRoleInfo:
post:
X-EmptyLimit:
- roleName
- roleCode
- identityId
- roleLevel
- appIds
- sortId
X-LengthLimit:
- roleName: 2,50
- roleCode: 2,20
X-RoleLimit:
- "1"
X-Sort:
- 3
consumes:
- application/x-www-form-urlencoded
description: 增加角色信息
parameters:
- description: 角色名称
in: formData
name: roleName
required: true
type: string
- description: 角色编码
in: formData
name: roleCode
required: true
type: string
- description: 身份ID
in: formData
name: identityId
required: true
type: integer
- description: 角色级别
in: formData
name: roleLevel
required: true
type: integer
- description: 角色所属系统ID多个用逗号分隔通用传-1
in: formData
name: appIds
required: true
type: string
- description: 排序号
in: formData
name: sortId
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 增加角色信息
tags:
- 角色信息
/base/role/DeleteRoleInfo:
post:
X-EmptyLimit:
- roleIds
X-LengthLimit:
- roleIds: 36,1800
X-RoleLimit:
- "1"
X-Sort:
- 4
consumes:
- application/x-www-form-urlencoded
description: 删除角色信息
parameters:
- description: 角色ID多个用逗号分隔
in: formData
name: roleIds
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 删除角色信息
tags:
- 角色信息
/base/role/GetBaseRoleMenuCorrInfo:
get:
X-EmptyLimit:
- roleId
X-LengthLimit:
- roleId: 36,36
X-RoleLimit:
- "1"
X-Sort:
- 1
consumes:
- application/x-www-form-urlencoded
description: 获取角色菜单对应关系
parameters:
- description: 角色ID
in: query
name: roleId
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 获取角色菜单对应关系
tags:
- 角色信息
/base/role/GetManageAreaInfo:
get:
X-EmptyLimit:
@ -3975,6 +4335,178 @@ paths:
summary: 获取人员角色信息
tags:
- 角色信息
/base/role/GetRoleInfo:
get:
X-EmptyLimit:
- roleId
X-LengthLimit:
- roleId: 36,36
X-RoleLimit:
- "1"
X-Sort:
- 2
consumes:
- application/x-www-form-urlencoded
description: 根据菜单ID获取该角色信息
parameters:
- description: 角色ID
in: query
name: roleId
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 根据菜单ID获取该角色信息
tags:
- 角色信息
/base/role/PageRoleInfo:
get:
X-RoleLimit:
- "1"
X-Sort:
- 1
consumes:
- application/x-www-form-urlencoded
description: 根据系统ID或身份ID获取角色信息
parameters:
- description: 第几页
in: query
name: page
required: true
type: integer
- description: 一页显示多少条
in: query
name: limit
required: true
type: integer
- description: 系统ID 全部传-1
in: query
name: appId
required: true
type: string
- description: 身份ID 全部传-1
in: query
name: identityId
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 根据系统ID或身份ID获取角色信息
tags:
- 角色信息
/base/role/SetBaseRoleMenuCorrInfo:
post:
X-EmptyLimit:
- roleId
- menuIds
X-LengthLimit:
- roleId: 36,36
- menuIds: 36,1800
X-RoleLimit:
- "1"
X-Sort:
- 2
consumes:
- application/x-www-form-urlencoded
description: 删除菜单信息
parameters:
- description: 角色ID
in: formData
name: roleId
required: true
type: string
- description: 菜单ID多个用逗号分隔
in: formData
name: menuIds
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 删除菜单信息
tags:
- 菜单信息
/base/role/UpdateRoleInfo:
post:
X-EmptyLimit:
- roleId
- roleName
- roleCode
- identityId
- roleLevel
- appIds
- sortId
X-LengthLimit:
- roleName: 36,36
- roleName: 2,50
- roleCode: 2,20
X-RoleLimit:
- "1"
X-Sort:
- 5
consumes:
- application/x-www-form-urlencoded
description: 增加角色信息
parameters:
- description: 角色ID
in: formData
name: roleId
required: true
type: string
- description: 角色名称
in: formData
name: roleName
required: true
type: string
- description: 角色编码
in: formData
name: roleCode
required: true
type: string
- description: 身份ID
in: formData
name: identityId
required: true
type: integer
- description: 角色级别
in: formData
name: roleLevel
required: true
type: integer
- description: 角色所属系统ID多个用逗号分隔通用传-1
in: formData
name: appIds
required: true
type: string
- description: 排序号
in: formData
name: sortId
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 增加角色信息
tags:
- 角色信息
/base/student/AddStudentInfo:
post:
X-EmptyLimit:

@ -53,8 +53,8 @@ require (
github.com/xormplus/core v0.0.0-20200308074340-f3bce19d5f31
github.com/xormplus/xorm v0.0.0-20201213020207-d4eee8f4037a
golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899
golang.org/x/net v0.0.0-20201216054612-986b41b23924 // indirect
golang.org/x/tools v0.0.0-20201215192005-fa10ef0b8743
golang.org/x/net v0.0.0-20201224014010-6772e930b67b // indirect
golang.org/x/tools v0.0.0-20210102185154-773b96fafca2
google.golang.org/grpc v1.34.0
google.golang.org/protobuf v1.25.0
gopkg.in/flosch/pongo2.v3 v3.0.0-20141028000813-5e81b817a0c4 // indirect

@ -694,6 +694,8 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201216054612-986b41b23924 h1:QsnDpLLOKwHBBDa8nDws4DYNc/ryVW2vCpxCs09d4PY=
golang.org/x/net v0.0.0-20201216054612-986b41b23924/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b h1:iFwSg7t5GZmB/Q5TjiEAsdoLDrdJRC1RiF2WhuV29Qw=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -794,6 +796,8 @@ golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/tools v0.0.0-20201120155355-20be4ac4bd6e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20201215192005-fa10ef0b8743 h1:SLHKXsC4wI4NdEGVGe/yxcTBkF/mPUS7agW3Qt5smVg=
golang.org/x/tools v0.0.0-20201215192005-fa10ef0b8743/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210102185154-773b96fafca2 h1:crjwvdT+rSAILpNOKhk/BNmefsucqGTeeRX2YBK/6Jg=
golang.org/x/tools v0.0.0-20210102185154-773b96fafca2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=

@ -57,7 +57,7 @@ func main() {
r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
//统一认证拦截器
r.Use(Handler.SsoHandler())
//r.Use(Handler.SsoHandler())
//EXCEL目录
//r.Static("/dsBaseWeb/static", "./Static")

Loading…
Cancel
Save