Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-operation-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-operation-api
Commits
2e503c9b
Commit
2e503c9b
authored
Jul 17, 2023
by
黄智
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口记录添加
parent
f6a7c526
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
66 additions
and
62 deletions
+66
-62
src/controller/login.go
src/controller/login.go
+1
-3
src/pkg/beagle/constant/constant.go
src/pkg/beagle/constant/constant.go
+8
-8
src/router/dict.go
src/router/dict.go
+9
-8
src/router/organizationrouter.go
src/router/organizationrouter.go
+7
-6
src/router/system_access_rule.go
src/router/system_access_rule.go
+5
-5
src/router/systemmenurouter.go
src/router/systemmenurouter.go
+8
-7
src/router/systempreferencerouter.go
src/router/systempreferencerouter.go
+8
-7
src/router/systemrolerouter.go
src/router/systemrolerouter.go
+9
-8
src/router/systemuserrouter.go
src/router/systemuserrouter.go
+11
-10
No files found.
src/controller/login.go
View file @
2e503c9b
...
...
@@ -6,9 +6,7 @@ import (
"github.com/gin-gonic/gin"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/bean/vo/request"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/common/conf"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/pkg/beagle/constant"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/pkg/beagle/resp"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/router/middleware/header"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/service"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/util"
"go.uber.org/zap"
...
...
@@ -283,7 +281,7 @@ func UserPhoneLogin(c *gin.Context) {
}
c
.
SetCookie
(
conf
.
CookieName
,
uuidStr
,
1
*
60
*
60
*
24
,
"/"
,
""
,
false
,
false
)
c
.
SetCookie
(
conf
.
CookieNameLastLogin
,
lastLogin
,
1
*
60
*
60
*
24
,
"/"
,
""
,
false
,
false
)
header
.
AddUserLoginLog
(
"登入"
,
"phone/login"
,
constant
.
OpTypeIntMap
[
constant
.
Login
],
c
,
userInfo
)
//
header.AddUserLoginLog("登入", "phone/login", constant.OpTypeIntMap[constant.Login], c, userInfo)
SendJsonResponse
(
c
,
resp
.
OK
,
msg
)
}
...
...
src/pkg/beagle/constant/constant.go
View file @
2e503c9b
...
...
@@ -84,9 +84,9 @@ const (
Login
=
OpType
(
"登入"
)
Logout
=
OpType
(
"登出"
)
AssignUser
=
OpType
(
"分配用户"
)
Up
Move
=
OpType
(
"上
移"
)
DownMove
=
OpType
(
"下移"
)
Export
=
OpType
(
"导出"
)
Up
dateMove
=
OpType
(
"上下
移"
)
//
DownMove = OpType("下移")
Export
=
OpType
(
"导出"
)
)
var
OpTypeMap
=
map
[
int
]
OpType
{
...
...
@@ -101,8 +101,8 @@ var OpTypeMap = map[int]OpType{
9
:
Login
,
10
:
Logout
,
11
:
AssignUser
,
12
:
UpMove
,
13
:
DownMove
,
12
:
Up
date
Move
,
//
13: DownMove,
14
:
Export
,
}
...
...
@@ -118,9 +118,9 @@ var OpTypeIntMap = map[OpType]int{
Login
:
9
,
Logout
:
10
,
AssignUser
:
11
,
Up
Move
:
12
,
DownMove
:
13
,
Export
:
14
,
Up
dateMove
:
12
,
//
DownMove: 13,
Export
:
14
,
}
// RiskLevel 风险等级
...
...
src/router/dict.go
View file @
2e503c9b
...
...
@@ -5,6 +5,7 @@ import (
"github.com/gin-gonic/gin"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/common/conf"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/controller"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/pkg/beagle/constant"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/router/middleware/header"
)
...
...
@@ -14,14 +15,14 @@ func initDictRoute(e *gin.Engine) {
//系统字典
dict
:=
new
(
controller
.
Dict
)
base
.
POST
(
""
,
dict
.
Add
)
//新增字典
base
.
PUT
(
""
,
dict
.
Update
)
//修改字典
base
.
DELETE
(
""
,
dict
.
Del
)
//删除字典
base
.
GET
(
""
,
dict
.
List
)
//字典列表
base
.
GET
(
"/tree"
,
dict
.
DictTree
)
//字典列表-树结构
base
.
GET
(
"/classList"
,
dict
.
ClassList
)
//字典分类列表
base
.
PUT
(
"/sort"
,
dict
.
DictSort
)
//字典排序
base
.
PUT
(
"/status"
,
dict
.
UpdateStatus
)
//字典排序
base
.
POST
(
""
,
header
.
AddLogMiddleware
(
"字典管理"
,
"/dict"
,
constant
.
OpTypeIntMap
[
constant
.
Add
]),
dict
.
Add
)
//新增字典
base
.
PUT
(
""
,
header
.
AddLogMiddleware
(
"字典管理"
,
"/dict"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
dict
.
Update
)
//修改字典
base
.
DELETE
(
""
,
header
.
AddLogMiddleware
(
"字典管理"
,
"/dict"
,
constant
.
OpTypeIntMap
[
constant
.
Delete
]),
dict
.
Del
)
//删除字典
base
.
GET
(
""
,
header
.
AddLogMiddleware
(
"字典管理"
,
"/dict"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
dict
.
List
)
//字典列表
base
.
GET
(
"/tree"
,
header
.
AddLogMiddleware
(
"字典管理"
,
"/dict/tree"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
dict
.
DictTree
)
//字典列表-树结构
base
.
GET
(
"/classList"
,
header
.
AddLogMiddleware
(
"字典管理"
,
"/dict/classList"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
dict
.
ClassList
)
//字典分类列表
base
.
PUT
(
"/sort"
,
header
.
AddLogMiddleware
(
"字典管理"
,
"/dict/sort"
,
constant
.
OpTypeIntMap
[
constant
.
UpdateMove
]),
dict
.
DictSort
)
//字典排序
base
.
PUT
(
"/status"
,
header
.
AddLogMiddleware
(
"字典管理"
,
"/dict/status"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
dict
.
UpdateStatus
)
//字典状态
//base.GET("/manage_list", dict.ManageList) //字典管理列表
...
...
src/router/organizationrouter.go
View file @
2e503c9b
...
...
@@ -4,6 +4,7 @@ import (
"fmt"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/common/conf"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/controller"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/pkg/beagle/constant"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/router/middleware/header"
"github.com/gin-gonic/gin"
...
...
@@ -13,11 +14,11 @@ import (
func
InitOrganizationRouter
(
e
*
gin
.
Engine
)
{
base
:=
e
.
Group
(
fmt
.
Sprintf
(
"%s/org"
,
conf
.
Options
.
Prefix
),
header
.
SetContext
)
{
base
.
POST
(
"/add"
,
controller
.
AddOrg
)
//新增组织or目录
base
.
PUT
(
"/:id"
,
controller
.
UpdateOrg
)
//更新组织或目录
base
.
DELETE
(
"/:id"
,
controller
.
DeleteOrg
)
//删除组织或者目录
base
.
PUT
(
"/sort"
,
controller
.
SortOrg
)
//组织排序
base
.
GET
(
"/tree"
,
controller
.
GetOrgTree
)
//查询组织树
base
.
GET
(
"/detail"
,
controller
.
OrgDetail
)
//查询组织详情
base
.
POST
(
"/add"
,
header
.
AddLogMiddleware
(
"组织管理"
,
"/org/add"
,
constant
.
OpTypeIntMap
[
constant
.
Add
]),
controller
.
AddOrg
)
//新增组织or目录
base
.
PUT
(
"/:id"
,
header
.
AddLogMiddleware
(
"组织管理"
,
"/org"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
UpdateOrg
)
//更新组织或目录
base
.
DELETE
(
"/:id"
,
header
.
AddLogMiddleware
(
"组织管理"
,
"/org"
,
constant
.
OpTypeIntMap
[
constant
.
Delete
]),
controller
.
DeleteOrg
)
//删除组织或者目录
base
.
PUT
(
"/sort"
,
header
.
AddLogMiddleware
(
"组织管理"
,
"/org/sort"
,
constant
.
OpTypeIntMap
[
constant
.
UpdateMove
]),
controller
.
SortOrg
)
//组织排序
base
.
GET
(
"/tree"
,
header
.
AddLogMiddleware
(
"组织管理"
,
"/org/tree"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
controller
.
GetOrgTree
)
//查询组织树
base
.
GET
(
"/detail"
,
header
.
AddLogMiddleware
(
"组织管理"
,
"/org/detail"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
controller
.
OrgDetail
)
//查询组织详情
}
}
src/router/system_access_rule.go
View file @
2e503c9b
...
...
@@ -13,12 +13,12 @@ import (
func
InitAccessRuleRouter
(
e
*
gin
.
Engine
)
{
rule
:=
e
.
Group
(
fmt
.
Sprintf
(
"%s/accessRule"
,
conf
.
Options
.
Prefix
),
header
.
SetContext
)
{
rule
.
POST
(
"addAccessRule"
,
controller
.
AddAccessRule
,
header
.
AddLogMiddleware
(
"访问规则管理"
,
"/addAccessRule"
,
constant
.
OpTypeIntMap
[
constant
.
Add
])
)
// 新增访问规则
rule
.
PUT
(
"updateAccessRule"
,
controller
.
UpdateAccessRule
,
header
.
AddLogMiddleware
(
"访问规则管理"
,
"/updateAccessRule"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
])
)
// 编辑访问规则
rule
.
DELETE
(
"delAccessRule"
,
controller
.
DelAccessRule
,
header
.
AddLogMiddleware
(
"访问规则管理"
,
"/delAccessRule"
,
constant
.
OpTypeIntMap
[
constant
.
AllDelete
])
)
// 删除访问规则
rule
.
GET
(
"listAccessRule"
,
controller
.
ListAccessRule
,
header
.
AddLogMiddleware
(
"访问规则管理"
,
"/listAccessRule"
,
constant
.
OpTypeIntMap
[
constant
.
Find
])
)
// 查询访问规则列表
rule
.
POST
(
"addAccessRule"
,
header
.
AddLogMiddleware
(
"访问规则管理"
,
"/addAccessRule"
,
constant
.
OpTypeIntMap
[
constant
.
Add
]),
controller
.
AddAccessRule
)
// 新增访问规则
rule
.
PUT
(
"updateAccessRule"
,
header
.
AddLogMiddleware
(
"访问规则管理"
,
"/updateAccessRule"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
UpdateAccessRule
)
// 编辑访问规则
rule
.
DELETE
(
"delAccessRule"
,
header
.
AddLogMiddleware
(
"访问规则管理"
,
"/delAccessRule"
,
constant
.
OpTypeIntMap
[
constant
.
AllDelete
]),
controller
.
DelAccessRule
)
// 删除访问规则
rule
.
GET
(
"listAccessRule"
,
header
.
AddLogMiddleware
(
"访问规则管理"
,
"/listAccessRule"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
controller
.
ListAccessRule
)
// 查询访问规则列表
rule
.
GET
(
"listRuleUser"
,
controller
.
ListRuleUser
)
// 查询用户详情列表
rule
.
PUT
(
"updateState"
,
controller
.
UpdateState
)
// 修改规则状态
rule
.
PUT
(
"updateState"
,
header
.
AddLogMiddleware
(
"访问规则管理"
,
"/updateState"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
UpdateState
)
// 修改规则状态
}
}
src/router/systemmenurouter.go
View file @
2e503c9b
...
...
@@ -4,6 +4,7 @@ import (
"fmt"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/common/conf"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/controller"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/pkg/beagle/constant"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/router/middleware/header"
"github.com/gin-gonic/gin"
...
...
@@ -13,12 +14,12 @@ func InitSystemMenuRouter(e *gin.Engine) {
base
:=
e
.
Group
(
fmt
.
Sprintf
(
"%s/menu"
,
conf
.
Options
.
Prefix
),
header
.
SetContext
)
{
base
.
GET
(
"/group/dict"
,
controller
.
GetGroupDict
)
//获取字典分组
base
.
POST
(
"/add"
,
controller
.
AddSystemMenu
)
//新增菜单
base
.
PUT
(
"/:id"
,
controller
.
UpdateMenu
)
//菜单更新
base
.
GET
(
"/tree"
,
controller
.
GetMenuTree
)
//获取菜单树形结构
base
.
PUT
(
"/sort"
,
controller
.
MenuSort
)
//菜单排序
base
.
DELETE
(
"/:id"
,
controller
.
DeleteMenu
)
//删除菜单
base
.
GET
(
"/user/tree"
,
controller
.
GetSystemTree
)
//获取当前系统用户树
base
.
GET
(
"/group/dict"
,
header
.
AddLogMiddleware
(
"菜单管理"
,
"/menu/group/dict"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
controller
.
GetGroupDict
)
//获取字典分组
base
.
POST
(
"/add"
,
header
.
AddLogMiddleware
(
"菜单管理"
,
"/menu/add"
,
constant
.
OpTypeIntMap
[
constant
.
Add
]),
controller
.
AddSystemMenu
)
//新增菜单
base
.
PUT
(
"/:id"
,
header
.
AddLogMiddleware
(
"菜单管理"
,
"/menu"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
UpdateMenu
)
//菜单更新
base
.
GET
(
"/tree"
,
header
.
AddLogMiddleware
(
"菜单管理"
,
"/menu/tree"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
controller
.
GetMenuTree
)
//获取菜单树形结构
base
.
PUT
(
"/sort"
,
header
.
AddLogMiddleware
(
"菜单管理"
,
"/menu/sort"
,
constant
.
OpTypeIntMap
[
constant
.
UpdateMove
]),
controller
.
MenuSort
)
//菜单排序
base
.
DELETE
(
"/:id"
,
header
.
AddLogMiddleware
(
"菜单管理"
,
"/menu"
,
constant
.
OpTypeIntMap
[
constant
.
Delete
]),
controller
.
DeleteMenu
)
//删除菜单
base
.
GET
(
"/user/tree"
,
header
.
AddLogMiddleware
(
"菜单管理"
,
"/menu/user/tree"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
controller
.
GetSystemTree
)
//获取当前系统用户树
}
}
src/router/systempreferencerouter.go
View file @
2e503c9b
...
...
@@ -5,6 +5,7 @@ import (
"github.com/gin-gonic/gin"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/common/conf"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/controller"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/pkg/beagle/constant"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/router/middleware/header"
)
...
...
@@ -12,13 +13,13 @@ import (
func
InitPreferenceConfigRouter
(
e
*
gin
.
Engine
)
{
sys
:=
e
.
Group
(
fmt
.
Sprintf
(
"%s/sysOptions"
,
conf
.
Options
.
Prefix
),
header
.
SetContext
)
{
sys
.
POST
(
"licenseOpts"
,
controller
.
SetLicenseOptions
)
// 设置授权信息
sys
.
POST
(
"loginPageOpts"
,
controller
.
SetLoginPageOptions
)
// 设置授权信息
sys
.
POST
(
"safeOpts"
,
controller
.
SetSafeOptions
)
// 设置安全选项
sys
.
POST
(
"loginOpts"
,
controller
.
SetLoginOptions
)
// 设置登录选项
sys
.
GET
(
"checkLicense"
,
controller
.
CheckLicense
)
// 校验license是否有效
sys
.
POST
(
"reStartConfig"
,
controller
.
ReStartConfig
)
// 一键还原受限
sys
.
POST
(
"getLicenseInfo"
,
controller
.
GetLicenseInfo
)
// 获取license信息
sys
.
POST
(
"licenseOpts"
,
header
.
AddLogMiddleware
(
"首选项管理"
,
"/sysOptions/licenseOpts"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
SetLicenseOptions
)
// 设置授权信息
sys
.
POST
(
"loginPageOpts"
,
header
.
AddLogMiddleware
(
"首选项管理"
,
"/sysOptions/loginPageOpts"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
SetLoginPageOptions
)
// 设置授权信息
sys
.
POST
(
"safeOpts"
,
header
.
AddLogMiddleware
(
"首选项管理"
,
"/sysOptions/safeOpts"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
SetSafeOptions
)
// 设置安全选项
sys
.
POST
(
"loginOpts"
,
header
.
AddLogMiddleware
(
"首选项管理"
,
"/sysOptions/loginOpts"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
SetLoginOptions
)
// 设置登录选项
sys
.
GET
(
"checkLicense"
,
header
.
AddLogMiddleware
(
"首选项管理"
,
"/sysOptions/checkLicense"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
CheckLicense
)
// 校验license是否有效
sys
.
POST
(
"reStartConfig"
,
header
.
AddLogMiddleware
(
"首选项管理"
,
"/sysOptions/reStartConfig"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
ReStartConfig
)
// 一键还原受限
sys
.
POST
(
"getLicenseInfo"
,
header
.
AddLogMiddleware
(
"首选项管理"
,
"/sysOptions/getLicenseInfo"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
GetLicenseInfo
)
// 获取license信息
}
notLoginSys
:=
e
.
Group
(
fmt
.
Sprintf
(
"%s/sysOptions"
,
conf
.
Options
.
Prefix
))
...
...
src/router/systemrolerouter.go
View file @
2e503c9b
...
...
@@ -4,6 +4,7 @@ import (
"fmt"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/common/conf"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/controller"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/pkg/beagle/constant"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/router/middleware/header"
"github.com/gin-gonic/gin"
...
...
@@ -14,13 +15,13 @@ func InitSystemRoleRouter(e *gin.Engine) {
base
:=
e
.
Group
(
fmt
.
Sprintf
(
"%s/role"
,
conf
.
Options
.
Prefix
),
header
.
SetContext
)
{
base
.
PUT
(
"create"
,
controller
.
CreateSystemRole
)
// 添加系统角色
base
.
POST
(
"update"
,
controller
.
UpdateSystemRole
)
// 编辑系统角色
base
.
POST
(
"state/:id/:state"
,
controller
.
SystemRoleState
)
// 系统角色状态
base
.
GET
(
"list"
,
controller
.
SystemRoleList
)
// 系统角色列表
base
.
GET
(
"detail/:id"
,
controller
.
SystemRoleDetail
)
// 系统角色详情
base
.
POST
(
"allotment/user"
,
controller
.
SystemRoleAllotmentUser
)
// 角色分配账户
base
.
GET
(
"allotment/list"
,
controller
.
SystemAllotUserList
)
// 角色可分配账户列表
base
.
DELETE
(
"delete"
,
controller
.
DeleteSystemRole
)
// 删除系统角色
base
.
PUT
(
"create"
,
header
.
AddLogMiddleware
(
"角色管理"
,
"/role/create"
,
constant
.
OpTypeIntMap
[
constant
.
Add
]),
controller
.
CreateSystemRole
)
// 添加系统角色
base
.
POST
(
"update"
,
header
.
AddLogMiddleware
(
"角色管理"
,
"/role/update"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
UpdateSystemRole
)
// 编辑系统角色
base
.
POST
(
"state/:id/:state"
,
header
.
AddLogMiddleware
(
"角色管理"
,
"/role/state"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
SystemRoleState
)
// 系统角色状态
base
.
GET
(
"list"
,
header
.
AddLogMiddleware
(
"角色管理"
,
"/role/list"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
controller
.
SystemRoleList
)
// 系统角色列表
base
.
GET
(
"detail/:id"
,
header
.
AddLogMiddleware
(
"角色管理"
,
"/role/detail"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
controller
.
SystemRoleDetail
)
// 系统角色详情
base
.
POST
(
"allotment/user"
,
header
.
AddLogMiddleware
(
"角色管理"
,
"/role/allotment/user"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
controller
.
SystemRoleAllotmentUser
)
// 角色分配账户
base
.
GET
(
"allotment/list"
,
header
.
AddLogMiddleware
(
"角色管理"
,
"/role/allotment/list"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
controller
.
SystemAllotUserList
)
// 角色可分配账户列表
base
.
DELETE
(
"delete"
,
header
.
AddLogMiddleware
(
"角色管理"
,
"/role/delete"
,
constant
.
OpTypeIntMap
[
constant
.
AllDelete
]),
controller
.
DeleteSystemRole
)
// 删除系统角色
}
}
src/router/systemuserrouter.go
View file @
2e503c9b
...
...
@@ -4,6 +4,7 @@ import (
"fmt"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/common/conf"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/controller"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/pkg/beagle/constant"
"gitlab.wodcloud.com/smart-operation/so-operation-api/src/router/middleware/header"
"github.com/gin-gonic/gin"
...
...
@@ -15,17 +16,17 @@ func InitSystemUserRouter(e *gin.Engine) {
{
base
.
GET
(
"/:id"
,
controller
.
OrgUserDetail
)
//查询组织用户详情
base
.
GET
(
"/select/role"
,
controller
.
OrgUserRoles
)
//注册平台用户使用的查询角色列表
base
.
POST
(
"/add"
,
controller
.
OrgAddUser
)
//添加组织用户
base
.
PUT
(
"/:id"
,
controller
.
OrgUpdateUser
)
//组织编辑用户
base
.
DELETE
(
"/del"
,
controller
.
DelOrgUser
)
//删除组织用户
base
.
POST
(
"/check"
,
controller
.
CheckRepetition
)
//去重校验
base
.
GET
(
"/devOps"
,
controller
.
DevOps
)
//运维人员列表
base
.
GET
(
"/:id"
,
header
.
AddLogMiddleware
(
"用户管理"
,
"/user"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
controller
.
OrgUserDetail
)
//查询组织用户详情
base
.
GET
(
"/select/role"
,
header
.
AddLogMiddleware
(
"用户管理"
,
"/user/select/role"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
controller
.
OrgUserRoles
)
//注册平台用户使用的查询角色列表
base
.
POST
(
"/add"
,
header
.
AddLogMiddleware
(
"用户管理"
,
"/user/add"
,
constant
.
OpTypeIntMap
[
constant
.
Add
]),
controller
.
OrgAddUser
)
//添加组织用户
base
.
PUT
(
"/:id"
,
header
.
AddLogMiddleware
(
"用户管理"
,
"/user"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
OrgUpdateUser
)
//组织编辑用户
base
.
DELETE
(
"/del"
,
header
.
AddLogMiddleware
(
"用户管理"
,
"/user/del"
,
constant
.
OpTypeIntMap
[
constant
.
AllDelete
]),
controller
.
DelOrgUser
)
//删除组织用户
base
.
POST
(
"/check"
,
header
.
AddLogMiddleware
(
"用户管理"
,
"/user/check"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
controller
.
CheckRepetition
)
//去重校验
base
.
GET
(
"/devOps"
,
header
.
AddLogMiddleware
(
"用户管理"
,
"/user/devOps"
,
constant
.
OpTypeIntMap
[
constant
.
Find
]),
controller
.
DevOps
)
//运维人员列表
base
.
POST
(
"/updatePwd"
,
controller
.
SystemUserEditPassword
)
// 修改账户密码
base
.
POST
(
"/resetPwd"
,
controller
.
ResetSystemUserPassword
)
// 重置账户密码
base
.
POST
(
"/updateState"
,
controller
.
SystemUserUpdateState
)
// 重置账户密码
base
.
POST
(
"/updatePwd"
,
header
.
AddLogMiddleware
(
"用户管理"
,
"/user/updatePwd"
,
constant
.
OpTypeIntMap
[
constant
.
UpdatePwd
]),
controller
.
SystemUserEditPassword
)
// 修改账户密码
base
.
POST
(
"/resetPwd"
,
header
.
AddLogMiddleware
(
"用户管理"
,
"/user/resetPwd"
,
constant
.
OpTypeIntMap
[
constant
.
ResetPwd
]),
controller
.
ResetSystemUserPassword
)
// 重置账户密码
base
.
POST
(
"/updateState"
,
header
.
AddLogMiddleware
(
"用户管理"
,
"/user/updateState"
,
constant
.
OpTypeIntMap
[
constant
.
Edit
]),
controller
.
SystemUserUpdateState
)
// 更新用户状态
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment