From 21a57aebe93e4ac3dc4ca99b715b68a7249daa8d Mon Sep 17 00:00:00 2001 From: YuleiLan Date: Tue, 14 Jul 2020 14:07:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/log/loginLog.go | 12 +- apis/system/dept.go | 18 +- apis/system/info.go | 6 +- apis/system/menu.go | 22 +- apis/system/post.go | 12 +- apis/system/role.go | 22 +- apis/system/rolemenu.go | 8 +- apis/system/sysuser.go | 34 +-- apis/tools/dbcolumns.go | 49 --- apis/tools/dbtables.go | 54 ---- apis/tools/gen.go | 51 ---- apis/tools/systables.go | 223 -------------- cmd/migrate/server.go | 4 +- config/db.sql | 284 +++++++----------- handler/auth.go | 16 +- models/base/base.go | 16 + models/gorm/gorm.go | 26 +- models/model.go | 11 - models/process/process/classify.go | 20 ++ models/process/process/process.go | 25 ++ models/process/task/history.go | 23 ++ models/process/task/task.go | 23 ++ models/process/tpl/tpl.go | 23 ++ .../process/workOrder/circulationHistory.go | 28 ++ models/process/workOrder/tplData.go | 22 ++ models/process/workOrder/workOrder.go | 26 ++ models/{ => system}/casbinrule.go | 5 +- models/{ => system}/datascope.go | 2 +- models/{ => system}/dept.go | 5 +- models/{ => system}/initdb.go | 2 +- models/{ => system}/login.go | 2 +- models/{ => system}/loginlog.go | 7 +- models/{ => system}/menu.go | 7 +- models/{ => system}/post.go | 7 +- models/{ => system}/role.go | 7 +- models/{ => system}/roledept.go | 2 +- models/{ => system}/rolemenu.go | 4 +- models/{ => system}/sysuser.go | 8 +- models/tools/dbcolumns.go | 61 ---- models/tools/dbtables.go | 53 ---- models/tools/syscolumns.go | 84 ------ models/tools/systables.go | 152 ---------- pkg/jsonTime/JSONTime.go | 38 +++ router/sys_router.go | 29 -- template/model.go.template | 2 +- 45 files changed, 472 insertions(+), 1063 deletions(-) delete mode 100644 apis/tools/dbcolumns.go delete mode 100644 apis/tools/dbtables.go delete mode 100644 apis/tools/gen.go delete mode 100644 apis/tools/systables.go create mode 100644 models/base/base.go delete mode 100644 models/model.go create mode 100644 models/process/process/classify.go create mode 100644 models/process/process/process.go create mode 100644 models/process/task/history.go create mode 100644 models/process/task/task.go create mode 100644 models/process/tpl/tpl.go create mode 100644 models/process/workOrder/circulationHistory.go create mode 100644 models/process/workOrder/tplData.go create mode 100644 models/process/workOrder/workOrder.go rename models/{ => system}/casbinrule.go (89%) rename models/{ => system}/datascope.go (98%) rename models/{ => system}/dept.go (99%) rename models/{ => system}/initdb.go (98%) rename models/{ => system}/login.go (98%) rename models/{ => system}/loginlog.go (96%) rename models/{ => system}/menu.go (99%) rename models/{ => system}/post.go (97%) rename models/{ => system}/role.go (98%) rename models/{ => system}/roledept.go (98%) rename models/{ => system}/rolemenu.go (98%) rename models/{ => system}/sysuser.go (98%) delete mode 100644 models/tools/dbcolumns.go delete mode 100644 models/tools/dbtables.go delete mode 100644 models/tools/syscolumns.go delete mode 100644 models/tools/systables.go create mode 100644 pkg/jsonTime/JSONTime.go diff --git a/apis/log/loginLog.go b/apis/log/loginLog.go index 7c26af6..726803b 100644 --- a/apis/log/loginLog.go +++ b/apis/log/loginLog.go @@ -1,7 +1,7 @@ package log import ( - "ferry/models" + "ferry/models/system" "ferry/tools" "ferry/tools/app" "net/http" @@ -22,7 +22,7 @@ import ( // @Router /api/v1/loginloglist [get] // @Security func GetLoginLogList(c *gin.Context) { - var data models.LoginLog + var data system.LoginLog var err error var pageSize = 10 var pageIndex = 1 @@ -62,7 +62,7 @@ func GetLoginLogList(c *gin.Context) { // @Router /api/v1/loginlog/{infoId} [get] // @Security func GetLoginLog(c *gin.Context) { - var LoginLog models.LoginLog + var LoginLog system.LoginLog LoginLog.InfoId, _ = tools.StringToInt(c.Param("infoId")) result, err := LoginLog.Get() tools.HasError(err, "抱歉未找到相关信息", -1) @@ -83,7 +83,7 @@ func GetLoginLog(c *gin.Context) { // @Router /api/v1/loginlog [post] // @Security Bearer func InsertLoginLog(c *gin.Context) { - var data models.LoginLog + var data system.LoginLog err := c.BindWith(&data, binding.JSON) tools.HasError(err, "", 500) result, err := data.Create() @@ -104,7 +104,7 @@ func InsertLoginLog(c *gin.Context) { // @Router /api/v1/loginlog [put] // @Security Bearer func UpdateLoginLog(c *gin.Context) { - var data models.LoginLog + var data system.LoginLog err := c.BindWith(&data, binding.JSON) tools.HasError(err, "", -1) result, err := data.Update(data.InfoId) @@ -122,7 +122,7 @@ func UpdateLoginLog(c *gin.Context) { // @Success 200 {string} string "{"code": -1, "message": "删除失败"}" // @Router /api/v1/loginlog/{infoId} [delete] func DeleteLoginLog(c *gin.Context) { - var data models.LoginLog + var data system.LoginLog data.UpdateBy = tools.GetUserIdStr(c) IDS := tools.IdsStrToIdsIntGroup("infoId", c) _, err := data.BatchDelete(IDS) diff --git a/apis/system/dept.go b/apis/system/dept.go index 7a6ae8d..d0fd098 100644 --- a/apis/system/dept.go +++ b/apis/system/dept.go @@ -1,7 +1,7 @@ package system import ( - "ferry/models" + "ferry/models/system" "ferry/tools" "ferry/tools/app" "ferry/tools/app/msg" @@ -20,7 +20,7 @@ import ( // @Router /api/v1/deptList [get] // @Security func GetDeptList(c *gin.Context) { - var Dept models.Dept + var Dept system.Dept Dept.DeptName = c.Request.FormValue("deptName") Dept.Status = c.Request.FormValue("status") Dept.DeptId, _ = tools.StringToInt(c.Request.FormValue("deptId")) @@ -31,7 +31,7 @@ func GetDeptList(c *gin.Context) { } func GetDeptTree(c *gin.Context) { - var Dept models.Dept + var Dept system.Dept Dept.DeptName = c.Request.FormValue("deptName") Dept.Status = c.Request.FormValue("status") Dept.DeptId, _ = tools.StringToInt(c.Request.FormValue("deptId")) @@ -49,7 +49,7 @@ func GetDeptTree(c *gin.Context) { // @Router /api/v1/dept/{deptId} [get] // @Security func GetDept(c *gin.Context) { - var Dept models.Dept + var Dept system.Dept Dept.DeptId, _ = tools.StringToInt(c.Param("deptId")) Dept.DataScope = tools.GetUserIdStr(c) result, err := Dept.Get() @@ -68,7 +68,7 @@ func GetDept(c *gin.Context) { // @Router /api/v1/dept [post] // @Security Bearer func InsertDept(c *gin.Context) { - var data models.Dept + var data system.Dept err := c.BindWith(&data, binding.JSON) tools.HasError(err, "", 500) data.CreateBy = tools.GetUserIdStr(c) @@ -89,7 +89,7 @@ func InsertDept(c *gin.Context) { // @Router /api/v1/dept [put] // @Security Bearer func UpdateDept(c *gin.Context) { - var data models.Dept + var data system.Dept err := c.BindJSON(&data) tools.HasError(err, "", -1) data.UpdateBy = tools.GetUserIdStr(c) @@ -106,7 +106,7 @@ func UpdateDept(c *gin.Context) { // @Success 200 {string} string "{"code": -1, "message": "删除失败"}" // @Router /api/v1/dept/{id} [delete] func DeleteDept(c *gin.Context) { - var data models.Dept + var data system.Dept id, err := tools.StringToInt(c.Param("id")) _, err = data.Delete(id) tools.HasError(err, "删除失败", 500) @@ -114,8 +114,8 @@ func DeleteDept(c *gin.Context) { } func GetDeptTreeRoleselect(c *gin.Context) { - var Dept models.Dept - var SysRole models.SysRole + var Dept system.Dept + var SysRole system.SysRole id, err := tools.StringToInt(c.Param("roleId")) SysRole.RoleId = id result, err := Dept.SetDeptLable() diff --git a/apis/system/info.go b/apis/system/info.go index 13c1257..8f52efd 100644 --- a/apis/system/info.go +++ b/apis/system/info.go @@ -1,7 +1,7 @@ package system import ( - "ferry/models" + "ferry/models/system" "ferry/tools" "ferry/tools/app" @@ -19,7 +19,7 @@ func GetInfo(c *gin.Context) { var buttons = make([]string, 1) buttons[0] = "*:*:*" - RoleMenu := models.RoleMenu{} + RoleMenu := system.RoleMenu{} RoleMenu.RoleId = tools.GetRoleId(c) var mp = make(map[string]interface{}) @@ -33,7 +33,7 @@ func GetInfo(c *gin.Context) { mp["buttons"] = list } - sysuser := models.SysUser{} + sysuser := system.SysUser{} sysuser.UserId = tools.GetUserId(c) user, err := sysuser.Get() tools.HasError(err, "", 500) diff --git a/apis/system/menu.go b/apis/system/menu.go index 63c5608..1817e4c 100644 --- a/apis/system/menu.go +++ b/apis/system/menu.go @@ -1,7 +1,7 @@ package system import ( - "ferry/models" + "ferry/models/system" "ferry/tools" "ferry/tools/app" @@ -18,7 +18,7 @@ import ( // @Router /api/v1/menulist [get] // @Security Bearer func GetMenuList(c *gin.Context) { - var Menu models.Menu + var Menu system.Menu Menu.MenuName = c.Request.FormValue("menuName") Menu.Visible = c.Request.FormValue("visible") Menu.Title = c.Request.FormValue("title") @@ -38,7 +38,7 @@ func GetMenuList(c *gin.Context) { // @Router /api/v1/menu [get] // @Security Bearer func GetMenu(c *gin.Context) { - var data models.Menu + var data system.Menu id, err := tools.StringToInt(c.Param("id")) data.MenuId = id result, err := data.GetByMenuId() @@ -47,8 +47,8 @@ func GetMenu(c *gin.Context) { } func GetMenuTreeRoleselect(c *gin.Context) { - var Menu models.Menu - var SysRole models.SysRole + var Menu system.Menu + var SysRole system.SysRole id, err := tools.StringToInt(c.Param("roleId")) SysRole.RoleId = id result, err := Menu.SetMenuLable() @@ -75,7 +75,7 @@ func GetMenuTreeRoleselect(c *gin.Context) { // @Router /api/v1/menuTreeselect [get] // @Security Bearer func GetMenuTreeelect(c *gin.Context) { - var data models.Menu + var data system.Menu result, err := data.SetMenuLable() tools.HasError(err, "抱歉未找到相关信息", -1) app.OK(c, result, "") @@ -97,7 +97,7 @@ func GetMenuTreeelect(c *gin.Context) { // @Router /api/v1/menu [post] // @Security Bearer func InsertMenu(c *gin.Context) { - var data models.Menu + var data system.Menu err := c.BindWith(&data, binding.JSON) tools.HasError(err, "抱歉未找到相关信息", -1) data.CreateBy = tools.GetUserIdStr(c) @@ -118,7 +118,7 @@ func InsertMenu(c *gin.Context) { // @Router /api/v1/menu/{id} [put] // @Security Bearer func UpdateMenu(c *gin.Context) { - var data models.Menu + var data system.Menu err2 := c.BindWith(&data, binding.JSON) data.UpdateBy = tools.GetUserIdStr(c) tools.HasError(err2, "修改失败", -1) @@ -136,7 +136,7 @@ func UpdateMenu(c *gin.Context) { // @Success 200 {string} string "{"code": -1, "message": "删除失败"}" // @Router /api/v1/menu/{id} [delete] func DeleteMenu(c *gin.Context) { - var data models.Menu + var data system.Menu id, err := tools.StringToInt(c.Param("id")) data.UpdateBy = tools.GetUserIdStr(c) _, err = data.Delete(id) @@ -153,7 +153,7 @@ func DeleteMenu(c *gin.Context) { // @Router /api/v1/menurole [get] // @Security Bearer func GetMenuRole(c *gin.Context) { - var Menu models.Menu + var Menu system.Menu result, err := Menu.SetMenuRole(tools.GetRoleName(c)) tools.HasError(err, "获取失败", 500) app.OK(c, result, "") @@ -168,7 +168,7 @@ func GetMenuRole(c *gin.Context) { // @Router /api/v1/menuids/{id} [get] // @Security Bearer func GetMenuIDS(c *gin.Context) { - var data models.RoleMenu + var data system.RoleMenu data.RoleName = c.GetString("role") data.UpdateBy = tools.GetUserIdStr(c) result, err := data.GetIDS() diff --git a/apis/system/post.go b/apis/system/post.go index b15111a..bff154e 100644 --- a/apis/system/post.go +++ b/apis/system/post.go @@ -1,7 +1,7 @@ package system import ( - "ferry/models" + "ferry/models/system" "ferry/tools" "ferry/tools/app" @@ -19,7 +19,7 @@ import ( // @Router /api/v1/post [get] // @Security func GetPostList(c *gin.Context) { - var data models.Post + var data system.Post var err error var pageSize = 10 var pageIndex = 1 @@ -53,7 +53,7 @@ func GetPostList(c *gin.Context) { // @Router /api/v1/post/{postId} [get] // @Security func GetPost(c *gin.Context) { - var Post models.Post + var Post system.Post Post.PostId, _ = tools.StringToInt(c.Param("postId")) result, err := Post.Get() tools.HasError(err, "抱歉未找到相关信息", -1) @@ -71,7 +71,7 @@ func GetPost(c *gin.Context) { // @Router /api/v1/post [post] // @Security Bearer func InsertPost(c *gin.Context) { - var data models.Post + var data system.Post err := c.Bind(&data) data.CreateBy = tools.GetUserIdStr(c) tools.HasError(err, "", 500) @@ -91,7 +91,7 @@ func InsertPost(c *gin.Context) { // @Router /api/v1/post/ [put] // @Security Bearer func UpdatePost(c *gin.Context) { - var data models.Post + var data system.Post err := c.Bind(&data) data.UpdateBy = tools.GetUserIdStr(c) @@ -109,7 +109,7 @@ func UpdatePost(c *gin.Context) { // @Success 200 {string} string "{"code": -1, "message": "删除失败"}" // @Router /api/v1/post/{postId} [delete] func DeletePost(c *gin.Context) { - var data models.Post + var data system.Post data.UpdateBy = tools.GetUserIdStr(c) IDS := tools.IdsStrToIdsIntGroup("postId", c) result, err := data.BatchDelete(IDS) diff --git a/apis/system/role.go b/apis/system/role.go index 5f24d69..9ea3104 100644 --- a/apis/system/role.go +++ b/apis/system/role.go @@ -1,7 +1,7 @@ package system import ( - "ferry/models" + "ferry/models/system" "ferry/tools" "ferry/tools/app" @@ -21,7 +21,7 @@ import ( // @Router /api/v1/rolelist [get] // @Security func GetRoleList(c *gin.Context) { - var data models.SysRole + var data system.SysRole var err error var pageSize = 10 var pageIndex = 1 @@ -53,7 +53,7 @@ func GetRoleList(c *gin.Context) { // @Router /api/v1/role [get] // @Security Bearer func GetRole(c *gin.Context) { - var Role models.SysRole + var Role system.SysRole Role.RoleId, _ = tools.StringToInt(c.Param("roleId")) result, err := Role.Get() menuIds := make([]int, 0) @@ -74,14 +74,14 @@ func GetRole(c *gin.Context) { // @Success 200 {string} string "{"code": -1, "message": "添加失败"}" // @Router /api/v1/role [post] func InsertRole(c *gin.Context) { - var data models.SysRole + var data system.SysRole data.CreateBy = tools.GetUserIdStr(c) err := c.BindWith(&data, binding.JSON) tools.HasError(err, "", 500) id, err := data.Insert() data.RoleId = id tools.HasError(err, "", -1) - var t models.RoleMenu + var t system.RoleMenu _, err = t.Insert(id, data.MenuIds) tools.HasError(err, "", -1) app.OK(c, data, "添加成功") @@ -97,13 +97,13 @@ func InsertRole(c *gin.Context) { // @Success 200 {string} string "{"code": -1, "message": "修改失败"}" // @Router /api/v1/role [put] func UpdateRole(c *gin.Context) { - var data models.SysRole + var data system.SysRole data.UpdateBy = tools.GetUserIdStr(c) err := c.Bind(&data) tools.HasError(err, "数据解析失败", -1) result, err := data.Update(data.RoleId) tools.HasError(err, "", -1) - var t models.RoleMenu + var t system.RoleMenu _, err = t.DeleteRoleMenu(data.RoleId) tools.HasError(err, "添加失败1", -1) _, err2 := t.Insert(data.RoleId, data.MenuIds) @@ -113,13 +113,13 @@ func UpdateRole(c *gin.Context) { } func UpdateRoleDataScope(c *gin.Context) { - var data models.SysRole + var data system.SysRole data.UpdateBy = tools.GetUserIdStr(c) err := c.Bind(&data) tools.HasError(err, "数据解析失败", -1) result, err := data.Update(data.RoleId) - var t models.SysRoleDept + var t system.SysRoleDept _, err = t.DeleteRoleDept(data.RoleId) tools.HasError(err, "添加失败1", -1) if data.DataScope == "2" { @@ -137,13 +137,13 @@ func UpdateRoleDataScope(c *gin.Context) { // @Success 200 {string} string "{"code": -1, "message": "删除失败"}" // @Router /api/v1/role/{roleId} [delete] func DeleteRole(c *gin.Context) { - var Role models.SysRole + var Role system.SysRole Role.UpdateBy = tools.GetUserIdStr(c) IDS := tools.IdsStrToIdsIntGroup("roleId", c) _, err := Role.BatchDelete(IDS) tools.HasError(err, "删除失败1", -1) - var t models.RoleMenu + var t system.RoleMenu _, err = t.BatchDeleteRoleMenu(IDS) tools.HasError(err, "删除失败1", -1) app.OK(c, "", "删除成功") diff --git a/apis/system/rolemenu.go b/apis/system/rolemenu.go index 18f6159..4491b5b 100644 --- a/apis/system/rolemenu.go +++ b/apis/system/rolemenu.go @@ -1,7 +1,7 @@ package system import ( - "ferry/models" + "ferry/models/system" "ferry/tools/app" "fmt" "net/http" @@ -18,7 +18,7 @@ import ( // @Router /api/v1/rolemenu [get] // @Security Bearer func GetRoleMenu(c *gin.Context) { - var Rm models.RoleMenu + var Rm system.RoleMenu err := c.ShouldBind(&Rm) result, err := Rm.Get() var res app.Response @@ -33,7 +33,7 @@ func GetRoleMenu(c *gin.Context) { type RoleMenuPost struct { RoleId string - RoleMenu []models.RoleMenu + RoleMenu []system.RoleMenu } func InsertRoleMenu(c *gin.Context) { @@ -54,7 +54,7 @@ func InsertRoleMenu(c *gin.Context) { // @Success 200 {string} string "{"code": -1, "message": "删除失败"}" // @Router /api/v1/rolemenu/{id} [delete] func DeleteRoleMenu(c *gin.Context) { - var t models.RoleMenu + var t system.RoleMenu id := c.Param("id") menuId := c.Request.FormValue("menu_id") fmt.Println(menuId) diff --git a/apis/system/sysuser.go b/apis/system/sysuser.go index 248bb93..bfe75de 100644 --- a/apis/system/sysuser.go +++ b/apis/system/sysuser.go @@ -1,7 +1,7 @@ package system import ( - "ferry/models" + "ferry/models/system" "ferry/tools" "ferry/tools/app" @@ -20,7 +20,7 @@ import ( // @Router /api/v1/sysUserList [get] // @Security Bearer func GetSysUserList(c *gin.Context) { - var data models.SysUser + var data system.SysUser var err error var pageSize = 10 var pageIndex = 1 @@ -60,12 +60,12 @@ func GetSysUserList(c *gin.Context) { // @Router /api/v1/sysUser/{userId} [get] // @Security func GetSysUser(c *gin.Context) { - var SysUser models.SysUser + var SysUser system.SysUser SysUser.UserId, _ = tools.StringToInt(c.Param("userId")) result, err := SysUser.Get() tools.HasError(err, "抱歉未找到相关信息", -1) - var SysRole models.SysRole - var Post models.Post + var SysRole system.SysRole + var Post system.Post roles, err := SysRole.GetList() posts, err := Post.GetList() @@ -91,14 +91,14 @@ func GetSysUser(c *gin.Context) { // @Router /api/v1/user/profile [get] // @Security func GetSysUserProfile(c *gin.Context) { - var SysUser models.SysUser + var SysUser system.SysUser userId := tools.GetUserIdStr(c) SysUser.UserId, _ = tools.StringToInt(userId) result, err := SysUser.Get() tools.HasError(err, "抱歉未找到相关信息", -1) - var SysRole models.SysRole - var Post models.Post - var Dept models.Dept + var SysRole system.SysRole + var Post system.Post + var Dept system.Dept //获取角色列表 roles, err := SysRole.GetList() //获取职位列表 @@ -131,8 +131,8 @@ func GetSysUserProfile(c *gin.Context) { // @Router /api/v1/sysUser [get] // @Security func GetSysUserInit(c *gin.Context) { - var SysRole models.SysRole - var Post models.Post + var SysRole system.SysRole + var Post system.Post roles, err := SysRole.GetList() posts, err := Post.GetList() tools.HasError(err, "抱歉未找到相关信息", -1) @@ -152,7 +152,7 @@ func GetSysUserInit(c *gin.Context) { // @Success 200 {string} string "{"code": -1, "message": "添加失败"}" // @Router /api/v1/sysUser [post] func InsertSysUser(c *gin.Context) { - var sysuser models.SysUser + var sysuser system.SysUser err := c.BindWith(&sysuser, binding.JSON) tools.HasError(err, "非法数据格式", 500) @@ -172,7 +172,7 @@ func InsertSysUser(c *gin.Context) { // @Success 200 {string} string "{"code": -1, "message": "修改失败"}" // @Router /api/v1/sysuser/{userId} [put] func UpdateSysUser(c *gin.Context) { - var data models.SysUser + var data system.SysUser err := c.Bind(&data) tools.HasError(err, "数据解析失败", -1) data.UpdateBy = tools.GetUserIdStr(c) @@ -189,7 +189,7 @@ func UpdateSysUser(c *gin.Context) { // @Success 200 {string} string "{"code": -1, "message": "删除失败"}" // @Router /api/v1/sysuser/{userId} [delete] func DeleteSysUser(c *gin.Context) { - var data models.SysUser + var data system.SysUser data.UpdateBy = tools.GetUserIdStr(c) IDS := tools.IdsStrToIdsIntGroup("userId", c) result, err := data.BatchDelete(IDS) @@ -215,7 +215,7 @@ func InsetSysUserAvatar(c *gin.Context) { // 上传文件至指定目录 _ = c.SaveUploadedFile(file, filPath) } - sysuser := models.SysUser{} + sysuser := system.SysUser{} sysuser.UserId = tools.GetUserId(c) sysuser.Avatar = "/" + filPath sysuser.UpdateBy = tools.GetUserIdStr(c) @@ -224,10 +224,10 @@ func InsetSysUserAvatar(c *gin.Context) { } func SysUserUpdatePwd(c *gin.Context) { - var pwd models.SysUserPwd + var pwd system.SysUserPwd err := c.Bind(&pwd) tools.HasError(err, "数据解析失败", 500) - sysuser := models.SysUser{} + sysuser := system.SysUser{} sysuser.UserId = tools.GetUserId(c) sysuser.SetPwd(pwd) app.OK(c, "", "密码修改成功") diff --git a/apis/tools/dbcolumns.go b/apis/tools/dbcolumns.go deleted file mode 100644 index c360942..0000000 --- a/apis/tools/dbcolumns.go +++ /dev/null @@ -1,49 +0,0 @@ -package tools - -import ( - "ferry/models/tools" - tools2 "ferry/tools" - "ferry/tools/app" - "net/http" - - "github.com/gin-gonic/gin" -) - -// @Summary 分页列表数据 / page list data -// @Description 数据库表列分页列表 / database table column page list -// @Tags 工具 / Tools -// @Param tableName query string false "tableName / 数据表名称" -// @Param pageSize query int false "pageSize / 页条数" -// @Param pageIndex query int false "pageIndex / 页码" -// @Success 200 {object} app.Response "{"code": 200, "data": [...]}" -// @Router /api/v1/db/columns/page [get] -func GetDBColumnList(c *gin.Context) { - var data tools.DBColumns - var err error - var pageSize = 10 - var pageIndex = 1 - - if size := c.Request.FormValue("pageSize"); size != "" { - pageSize = tools2.StrToInt(err, size) - } - - if index := c.Request.FormValue("pageIndex"); index != "" { - pageIndex = tools2.StrToInt(err, index) - } - - data.TableName = c.Request.FormValue("tableName") - tools2.Assert(data.TableName == "", "table name cannot be empty!", 500) - result, count, err := data.GetPage(pageSize, pageIndex) - tools2.HasError(err, "", -1) - - var mp = make(map[string]interface{}, 3) - mp["list"] = result - mp["count"] = count - mp["pageIndex"] = pageIndex - mp["pageSize"] = pageSize - - var res app.Response - res.Data = mp - - c.JSON(http.StatusOK, res.ReturnOK()) -} diff --git a/apis/tools/dbtables.go b/apis/tools/dbtables.go deleted file mode 100644 index a5bb5b0..0000000 --- a/apis/tools/dbtables.go +++ /dev/null @@ -1,54 +0,0 @@ -package tools - -import ( - "ferry/models/tools" - tools2 "ferry/tools" - "ferry/tools/app" - config2 "ferry/tools/config" - "net/http" - - "github.com/gin-gonic/gin" -) - -// @Summary 分页列表数据 / page list data -// @Description 数据库表分页列表 / database table page list -// @Tags 工具 / Tools -// @Param tableName query string false "tableName / 数据表名称" -// @Param pageSize query int false "pageSize / 页条数" -// @Param pageIndex query int false "pageIndex / 页码" -// @Success 200 {object} app.Response "{"code": 200, "data": [...]}" -// @Router /api/v1/db/tables/page [get] -func GetDBTableList(c *gin.Context) { - var res app.Response - var data tools.DBTables - var err error - var pageSize = 10 - var pageIndex = 1 - if config2.DatabaseConfig.Dbtype == "sqlite3" { - res.Msg = "对不起,sqlite3 暂不支持代码生成!" - c.JSON(http.StatusOK, res.ReturnError(500)) - return - } - - if size := c.Request.FormValue("pageSize"); size != "" { - pageSize = tools2.StrToInt(err, size) - } - - if index := c.Request.FormValue("pageIndex"); index != "" { - pageIndex = tools2.StrToInt(err, index) - } - - data.TableName = c.Request.FormValue("tableName") - result, count, err := data.GetPage(pageSize, pageIndex) - tools2.HasError(err, "", -1) - - var mp = make(map[string]interface{}, 3) - mp["list"] = result - mp["count"] = count - mp["pageIndex"] = pageIndex - mp["pageSize"] = pageSize - - res.Data = mp - - c.JSON(http.StatusOK, res.ReturnOK()) -} diff --git a/apis/tools/gen.go b/apis/tools/gen.go deleted file mode 100644 index ff97d6f..0000000 --- a/apis/tools/gen.go +++ /dev/null @@ -1,51 +0,0 @@ -package tools - -import ( - "bytes" - "ferry/models/tools" - tools2 "ferry/tools" - "ferry/tools/app" - "net/http" - "text/template" - - "github.com/gin-gonic/gin" -) - -func Preview(c *gin.Context) { - table := tools.SysTables{} - id, err := tools2.StringToInt(c.Param("tableId")) - tools2.HasError(err, "", -1) - table.TableId = id - t1, err := template.ParseFiles("template/model.go.template") - tools2.HasError(err, "", -1) - t2, err := template.ParseFiles("template/api.go.template") - tools2.HasError(err, "", -1) - t3, err := template.ParseFiles("template/js.go.template") - tools2.HasError(err, "", -1) - t4, err := template.ParseFiles("template/vue.go.template") - tools2.HasError(err, "", -1) - t5, err := template.ParseFiles("template/router.go.template") - tools2.HasError(err, "", -1) - tab, _ := table.Get() - var b1 bytes.Buffer - err = t1.Execute(&b1, tab) - var b2 bytes.Buffer - err = t2.Execute(&b2, tab) - var b3 bytes.Buffer - err = t3.Execute(&b3, tab) - var b4 bytes.Buffer - err = t4.Execute(&b4, tab) - var b5 bytes.Buffer - err = t5.Execute(&b5, tab) - - mp := make(map[string]interface{}) - mp["template/model.go.template"] = b1.String() - mp["template/api.go.template"] = b2.String() - mp["template/js.go.template"] = b3.String() - mp["template/vue.go.template"] = b4.String() - mp["template/router.go.template"] = b5.String() - var res app.Response - res.Data = mp - - c.JSON(http.StatusOK, res.ReturnOK()) -} diff --git a/apis/tools/systables.go b/apis/tools/systables.go deleted file mode 100644 index c100698..0000000 --- a/apis/tools/systables.go +++ /dev/null @@ -1,223 +0,0 @@ -package tools - -import ( - "ferry/models/tools" - tools2 "ferry/tools" - "ferry/tools/app" - "net/http" - "strings" - - "github.com/gin-gonic/gin" -) - -// @Summary 分页列表数据 -// @Description 生成表分页列表 -// @Tags 工具 - 生成表 -// @Param tableName query string false "tableName / 数据表名称" -// @Param pageSize query int false "pageSize / 页条数" -// @Param pageIndex query int false "pageIndex / 页码" -// @Success 200 {object} app.Response "{"code": 200, "data": [...]}" -// @Router /api/v1/sys/tables/page [get] -func GetSysTableList(c *gin.Context) { - var data tools.SysTables - var err error - var pageSize = 10 - var pageIndex = 1 - - if size := c.Request.FormValue("pageSize"); size != "" { - pageSize = tools2.StrToInt(err, size) - } - - if index := c.Request.FormValue("pageIndex"); index != "" { - pageIndex = tools2.StrToInt(err, index) - } - - data.TBName = c.Request.FormValue("tableName") - data.TableComment = c.Request.FormValue("tableComment") - result, count, err := data.GetPage(pageSize, pageIndex) - tools2.HasError(err, "", -1) - - var mp = make(map[string]interface{}, 3) - mp["list"] = result - mp["count"] = count - mp["pageIndex"] = pageIndex - mp["pageSize"] = pageSize - - var res app.Response - res.Data = mp - - c.JSON(http.StatusOK, res.ReturnOK()) -} - -// @Summary 获取配置 -// @Description 获取JSON -// @Tags 工具 - 生成表 -// @Param configKey path int true "configKey" -// @Success 200 {object} app.Response "{"code": 200, "data": [...]}" -// @Router /api/v1/sys/tables/info/{tableId} [get] -// @Security -func GetSysTables(c *gin.Context) { - var data tools.SysTables - data.TableId, _ = tools2.StringToInt(c.Param("tableId")) - result, err := data.Get() - tools2.HasError(err, "抱歉未找到相关信息", -1) - - var res app.Response - res.Data = result - mp := make(map[string]interface{}) - mp["rows"] = result.Columns - mp["info"] = result - res.Data = mp - c.JSON(http.StatusOK, res.ReturnOK()) -} - -// @Summary 添加表结构 -// @Description 添加表结构 -// @Tags 工具 - 生成表 -// @Accept application/json -// @Product application/json -// @Param tables query string false "tableName / 数据表名称" -// @Success 200 {string} string "{"code": 200, "message": "添加成功"}" -// @Success 200 {string} string "{"code": -1, "message": "添加失败"}" -// @Router /api/v1/sys/tables/info [post] -// @Security Bearer -func InsertSysTable(c *gin.Context) { - - tablesList := strings.Split(c.Request.FormValue("tables"), ",") - for i := 0; i < len(tablesList); i++ { - - data, err := genTableInit(tablesList, i, c) - - _, err = data.Create() - tools2.HasError(err, "", -1) - } - var res app.Response - res.Msg = "添加成功!" - c.JSON(http.StatusOK, res.ReturnOK()) - -} - -func genTableInit(tablesList []string, i int, c *gin.Context) (tools.SysTables, error) { - var data tools.SysTables - var dbTable tools.DBTables - var dbColumn tools.DBColumns - data.TBName = tablesList[i] - data.CreateBy = tools2.GetUserIdStr(c) - - dbTable.TableName = data.TBName - dbtable, err := dbTable.Get() - - dbColumn.TableName = data.TBName - tablenamelist := strings.Split(dbColumn.TableName, "_") - for i := 0; i < len(tablenamelist); i++ { - strStart := string([]byte(tablenamelist[i])[:1]) - strend := string([]byte(tablenamelist[i])[1:]) - data.ClassName += strings.ToUpper(strStart) + strend - data.PackageName += strings.ToLower(strStart) + strings.ToLower(strend) - data.ModuleName += strings.ToLower(strStart) + strings.ToLower(strend) - } - data.TplCategory = "crud" - data.Crud = true - - dbcolumn, err := dbColumn.GetList() - data.CreateBy = tools2.GetUserIdStr(c) - data.TableComment = dbtable.TableComment - if dbtable.TableComment == "" { - data.TableComment = data.ClassName - } - - data.FunctionName = data.TableComment - data.BusinessName = data.ModuleName - data.IsLogicalDelete = "1" - data.LogicalDelete = true - data.LogicalDeleteColumn = "is_del" - - data.FunctionAuthor = "wenjianzhang" - for i := 0; i < len(dbcolumn); i++ { - var column tools.SysColumns - column.ColumnComment = dbcolumn[i].ColumnComment - column.ColumnName = dbcolumn[i].ColumnName - column.ColumnType = dbcolumn[i].ColumnType - column.Sort = i + 1 - column.Insert = true - column.IsInsert = "1" - column.QueryType = "EQ" - column.IsPk = "0" - - namelist := strings.Split(dbcolumn[i].ColumnName, "_") - for i := 0; i < len(namelist); i++ { - strStart := string([]byte(namelist[i])[:1]) - strend := string([]byte(namelist[i])[1:]) - column.GoField += strings.ToUpper(strStart) + strend - if i == 0 { - column.JsonField = strings.ToLower(strStart) + strend - } else { - column.JsonField += strings.ToUpper(strStart) + strend - } - } - if strings.Contains(dbcolumn[i].ColumnKey, "PR") { - column.IsPk = "1" - column.Pk = true - data.PkColumn = dbcolumn[i].ColumnName - data.PkGoField = column.GoField - data.PkJsonField = column.JsonField - } - column.IsRequired = "0" - if strings.Contains(dbcolumn[i].IsNullable, "NO") { - column.IsRequired = "1" - column.Required = true - } - - if strings.Contains(dbcolumn[i].ColumnType, "int") { - column.GoType = "int" - column.HtmlType = "input" - } else { - column.GoType = "string" - column.HtmlType = "input" - } - - data.Columns = append(data.Columns, column) - } - return data, err -} - -// @Summary 修改表结构 -// @Description 修改表结构 -// @Tags 工具 - 生成表 -// @Accept application/json -// @Product application/json -// @Param data body models.Dept true "body" -// @Success 200 {string} string "{"code": 200, "message": "添加成功"}" -// @Success 200 {string} string "{"code": -1, "message": "添加失败"}" -// @Router /api/v1/sys/tables/info [put] -// @Security Bearer -func UpdateSysTable(c *gin.Context) { - var data tools.SysTables - err := c.Bind(&data) - tools2.HasError(err, "数据解析失败", -1) - data.UpdateBy = tools2.GetUserIdStr(c) - result, err := data.Update() - tools2.HasError(err, "", -1) - - var res app.Response - res.Data = result - res.Msg = "修改成功" - c.JSON(http.StatusOK, res.ReturnOK()) -} - -// @Summary 删除表结构 -// @Description 删除表结构 -// @Tags 工具 - 生成表 -// @Param tableId path int true "tableId" -// @Success 200 {string} string "{"code": 200, "message": "删除成功"}" -// @Success 200 {string} string "{"code": -1, "message": "删除失败"}" -// @Router /api/v1/sys/tables/info/{tableId} [delete] -func DeleteSysTables(c *gin.Context) { - var data tools.SysTables - IDS := tools2.IdsStrToIdsIntGroup("tableId", c) - _, err := data.BatchDelete(IDS) - tools2.HasError(err, "删除失败", 500) - var res app.Response - res.Msg = "删除成功" - c.JSON(http.StatusOK, res.ReturnOK()) -} diff --git a/cmd/migrate/server.go b/cmd/migrate/server.go index c1cc8b9..3141736 100644 --- a/cmd/migrate/server.go +++ b/cmd/migrate/server.go @@ -3,8 +3,8 @@ package migrate import ( "ferry/database" "ferry/global/orm" - "ferry/models" "ferry/models/gorm" + "ferry/models/system" "ferry/tools" config2 "ferry/tools/config" "fmt" @@ -44,7 +44,7 @@ func run() { _ = migrateModel() log.Println("数据库结构初始化成功!") //5. 数据初始化完成 - if err := models.InitDb(); err != nil { + if err := system.InitDb(); err != nil { log.Fatal("数据库基础数据初始化失败!") } diff --git a/config/db.sql b/config/db.sql index 8a2f09d..9f670df 100644 --- a/config/db.sql +++ b/config/db.sql @@ -108,98 +108,109 @@ INSERT INTO `sys_dept` VALUES (10, 1, '/0/1/10', '人力资源', 3, '张三', '' COMMIT; BEGIN; -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (2, 'Upms', '系统管理', 'example', '/upms', '/0/2', 'M', '无', '', 0, '1', '', 'Layout', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (3, 'Sysuser', '用户管理', 'user', 'sysuser', '/0/2/3', 'C', '无', 'system:sysuser:list', 2, NULL, NULL, '/system/sysuser/index', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-07-14 00:26:53', NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (43, NULL, '新增用户', NULL, '/api/v1/sysuser', '/0/2/3/43', 'F', 'POST', 'system:sysuser:add', 3, NULL, NULL, NULL, 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (44, NULL, '查询用户', NULL, '/api/v1/sysuser', '/0/2/3/44', 'F', 'GET', 'system:sysuser:query', 3, NULL, NULL, NULL, 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (45, NULL, '修改用户', NULL, '/api/v1/sysuser/', '/0/2/3/45', 'F', 'PUT', 'system:sysuser:edit', 3, NULL, NULL, NULL, 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (46, NULL, '删除用户', NULL, '/api/v1/sysuser/', '/0/2/3/46', 'F', 'DELETE', 'system:sysuser:remove', 3, NULL, NULL, NULL, 0, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 15:32:45', NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (51, 'Menu', '菜单管理', 'tree-table', 'menu', '/0/2/51', 'C', '无', 'system:sysmenu:list', 2, '1', '', '/system/menu/index', 5, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-07-14 00:28:03', NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (52, 'Role', '角色管理', 'peoples', 'role', '/0/2/52', 'C', '无', 'system:sysrole:list', 2, '1', '', '/system/role/index', 2, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-07-14 00:27:30', NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (56, 'Dept', '部门管理', 'tree', 'dept', '/0/2/56', 'C', '无', 'system:sysdept:list', 2, '0', '', '/system/dept/index', 4, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-07-14 00:28:08', NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (57, 'post', '岗位管理', 'pass', 'post', '/0/2/57', 'C', '无', 'system:syspost:list', 2, '0', '', '/system/post/index', 3, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-07-14 00:28:20', NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (63, '', '接口权限', 'bug', '', '/0/63', 'M', '', '', 0, '0', '', '', 99, '1', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 16:39:32', NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (64, '', '用户管理', 'user', '', '/0/63/64', 'M', '', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (66, '', '菜单管理', 'tree-table', '', '/0/63/66', 'C', '', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (67, '', '菜单列表', 'tree-table', '/api/v1/menulist', '/0/63/66/67', 'A', 'GET', '', 66, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (68, '', '新建菜单', 'tree', '/api/v1/menu', '/0/63/66/68', 'A', 'POST', '', 66, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (72, '', '修改菜单', 'bug', '/api/v1/menu', '/0/63/66/72', 'A', 'PUT', '', 66, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (73, '', '删除菜单', 'bug', '/api/v1/menu/:id', '/0/63/66/73', 'A', 'DELETE', '', 66, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (74, NULL, '管理员列表', 'bug', '/api/v1/sysUserList', '/0/63/64/74', 'A', 'GET', NULL, 64, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (75, NULL, '根据id获取管理员', 'bug', '/api/v1/sysUser/:id', '/0/63/64/75', 'A', 'GET', NULL, 64, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (76, NULL, '获取管理员', 'bug', '/api/v1/sysUser/', '/0/63/64/76', 'A', 'GET', NULL, 64, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (77, NULL, '创建管理员', 'bug', '/api/v1/sysUser', '/0/63/64/77', 'A', 'POST', NULL, 64, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (78, NULL, '修改管理员', 'bug', '/api/v1/sysUser', '/0/63/64/78', 'A', 'PUT', NULL, 64, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (79, NULL, '删除管理员', 'bug', '/api/v1/sysUser/:id', '/0/63/64/79', 'A', 'DELETE', NULL, 64, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (80, NULL, '当前用户个人信息', 'bug', '/api/v1/user/profile', '/0/63/256/267/80', 'A', 'GET', NULL, 267, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', '2020-05-03 20:50:40', NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (81, NULL, '角色列表', 'bug', '/api/v1/rolelist', '/0/63/201/81', 'A', 'GET', NULL, 201, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (82, NULL, '获取角色信息', 'bug', '/api/v1/role/:id', '/0/63/201/82', 'A', 'GET', NULL, 201, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (83, NULL, '创建角色', 'bug', '/api/v1/role', '/0/63/201/83', 'A', 'POST', NULL, 201, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (84, NULL, '修改角色', 'bug', '/api/v1/role', '/0/63/201/84', 'A', 'PUT', NULL, 201, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (85, NULL, '删除角色', 'bug', '/api/v1/role/:id', '/0/63/201/85', 'A', 'DELETE', NULL, 201, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (92, NULL, '获取角色菜单', 'bug', '/api/v1/menurole', '/0/63/201/92', 'A', 'GET', NULL, 201, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (93, NULL, '根据角色id获取角色', 'bug', '/api/v1/roleMenuTreeselect/:id', '/0/63/201/93', 'A', 'GET', NULL, 201, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (94, NULL, '获取菜单树', 'bug', '/api/v1/menuTreeselect', '/0/63/256/94', 'A', 'GET', NULL, 256, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', '2020-05-03 20:52:11', NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (95, NULL, '获取角色菜单', 'bug', '/api/v1/rolemenu', '/0/63/205/95', 'A', 'GET', NULL, 205, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (96, NULL, '创建角色菜单', 'bug', '/api/v1/rolemenu', '/0/63/205/96', 'A', 'POST', NULL, 205, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (97, NULL, '删除用户菜单数据', 'bug', '/api/v1/rolemenu/:id', '/0/63/205/97', 'A', 'DELETE', NULL, 205, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (103, NULL, '部门菜单列表', 'bug', '/api/v1/deptList', '/0/63/203/103', 'A', 'GET', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (104, NULL, '根据id获取部门信息', 'bug', '/api/v1/dept/:id', '/0/63/203/104', 'A', 'GET', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (105, NULL, '创建部门', 'bug', '/api/v1/dept', '/0/63/203/105', 'A', 'POST', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (106, NULL, '修改部门', 'bug', '/api/v1/dept', '/0/63/203/106', 'A', 'PUT', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (107, NULL, '删除部门', 'bug', '/api/v1/dept/:id', '/0/63/203/107', 'A', 'DELETE', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (119, NULL, '获取岗位列表', 'bug', '/api/v1/postlist', '/0/63/204/119', 'A', 'GET', NULL, 204, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (120, NULL, '通过id获取岗位信息', 'bug', '/api/v1/post/:id', '/0/63/204/120', 'A', 'GET', NULL, 204, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (121, NULL, '创建岗位', 'bug', '/api/v1/post', '/0/63/204/121', 'A', 'POST', NULL, 204, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (122, NULL, '修改岗位', 'bug', '/api/v1/post', '/0/63/204/122', 'A', 'PUT', NULL, 204, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (123, NULL, '删除岗位', 'bug', '/api/v1/post/:id', '/0/63/204/123', 'A', 'DELETE', NULL, 204, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (137, NULL, '菜单列表', 'bug', '/api/v1/menulist', '/0/63/66/137', 'A', 'GET', NULL, 66, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (138, NULL, '获取根据id菜单信息', 'bug', '/api/v1/menu/:id', '/0/63/66/138', 'A', 'GET', NULL, 66, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (139, NULL, '创建菜单', 'bug', '/api/v1/menu', '/0/63/66/139', 'A', 'POST', NULL, 66, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (140, NULL, '修改菜单', 'bug', '/api/v1/menu/:id', '/0/63/66/140', 'A', 'PUT', NULL, 66, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (141, NULL, '删除菜单', 'bug', '/api/v1/menu/:id', '', 'A', 'DELETE', NULL, 66, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (142, NULL, '获取角色对应的菜单id数组', 'bug', '/api/v1/menuids', '/0/63/256/142', 'A', 'GET', NULL, 256, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (201, '', '角色管理', 'peoples', '', '/0/63/201', 'C', 'GET', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (203, '', '部门管理', 'tree', '', '/0/63/203', 'C', 'POST', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (204, '', '岗位管理', 'pass', '', '/0/63/204', 'C', '', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (205, '', '角色菜单管理', 'nested', '', '/0/63/205', 'C', '', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (212, 'LoginLog', '登录日志', 'logininfor', '/loginlog', '/0/2/212', 'C', '', 'system:sysloginlog:list', 2, '0', '', '/system/loginlog/index', 6, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-07-14 00:28:13', NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (213, NULL, '获取登录日志', 'bug', '/api/v1/loginloglist', '/0/63/214/213', 'A', 'GET', NULL, 214, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (214, '', '日志管理', 'log', '', '/0/63/214', 'M', 'GET', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (215, '', '删除日志', 'bug', '/api/v1/loginlog/:id', '/0/63/214/215', 'A', 'DELETE', '', 214, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (220, '', '新增菜单', '', '', '/0/2/51/220', 'F', '', 'system:sysmenu:add', 51, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (221, '', '修改菜单', 'edit', '', '/0/2/51/221', 'F', '', 'system:sysmenu:edit', 51, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (222, '', '查询菜单', 'search', '', '/0/2/51/222', 'F', '', 'system:sysmenu:query', 51, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (223, '', '删除菜单', '', '', '/0/2/51/223', 'F', '', 'system:sysmenu:remove', 51, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (224, '', '新增角色', '', '', '/0/2/52/224', 'F', '', 'system:sysrole:add', 52, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (225, '', '查询角色', '', '', '/0/2/52/225', 'F', '', 'system:sysrole:query', 52, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (226, '', '修改角色', '', '', '/0/2/52/226', 'F', '', 'system:sysrole:edit', 52, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (227, '', '删除角色', '', '', '/0/2/52/227', 'F', '', 'system:sysrole:remove', 52, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (228, '', '查询部门', '', '', '/0/2/56/228', 'F', '', 'system:sysdept:query', 56, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (229, '', '新增部门', '', '', '/0/2/56/229', 'F', '', 'system:sysdept:add', 56, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (230, '', '修改部门', '', '', '/0/2/56/230', 'F', '', 'system:sysdept:edit', 56, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (231, '', '删除部门', '', '', '/0/2/56/231', 'F', '', 'system:sysdept:remove', 56, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (232, '', '查询岗位', '', '', '/0/2/57/232', 'F', '', 'system:syspost:query', 57, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (233, '', '新增岗位', '', '', '/0/2/57/233', 'F', '', 'system:syspost:add', 57, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (234, '', '修改岗位', '', '', '/0/2/57/234', 'F', '', 'system:syspost:edit', 57, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (235, '', '删除岗位', '', '', '/0/2/57/235', 'F', '', 'system:syspost:remove', 57, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (244, '', '查询参数', '', '', '/0/2/62/244', 'F', '', 'system:sysconfig:query', 62, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (245, '', '新增参数', '', '', '/0/2/62/245', 'F', '', 'system:sysconfig:add', 62, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (246, '', '修改参数', '', '', '/0/2/62/246', 'F', '', 'system:sysconfig:edit', 62, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (247, '', '删除参数', '', '', '/0/2/62/247', 'F', '', 'system:sysconfig:remove', 62, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (248, '', '查询登录日志', '', '', '/0/2/211/212/248', 'F', '', 'system:sysloginlog:query', 212, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (249, '', '删除登录日志', '', '', '/0/2/211/212/249', 'F', '', 'system:sysloginlog:remove', 212, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (250, '', '查询操作日志', '', '', '/0/2/211/216/250', 'F', '', 'system:sysoperlog:query', 216, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (251, '', '删除操作日志', '', '', '/0/2/211/216/251', 'F', '', 'system:sysoperlog:remove', 216, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (252, '', '获取登录用户信息', '', '/api/v1/getinfo', '/0/63/256/252', 'A', 'GET', '', 256, '0', '', '', 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (253, '', '角色数据权限', '', '/api/v1/roledatascope', '/0/63/201/253', 'A', 'PUT', '', 201, '0', '', '', 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (254, '', '部门树接口【数据权限】', '', '/api/v1/roleDeptTreeselect/:id', '/0/63/256/254', 'A', 'GET', '', 256, '0', '', '', 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (255, '', '部门树【用户列表】', '', '/api/v1/deptTree', '/0/63/256/255', 'A', 'GET', '', 256, '0', '', '', 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (256, '', '必开接口', '', '', '/0/63/256', 'M', 'GET', '', 63, '0', '', '', 0, '1', '1', '', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (258, '', '退出登录', '', '/api/v1/logout', '/0/63/256/258', 'A', 'POST', '', 256, '0', '', '', 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (259, '', '头像上传', '', '/api/v1/user/avatar', '/0/63/256/267/259', 'A', 'POST', '', 267, '0', '', '', 0, '1', '1', '1', 0, '2020-04-11 15:52:48', '2020-05-03 20:50:05', NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (260, '', '修改密码', '', '/api/v1/user/pwd', '/0/63/256/260', 'A', 'PUT', '', 256, '0', '', '', 0, '1', '1', '', 0, '2020-04-11 15:52:48', NULL, NULL); -INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `created_at`, `updated_at`, `deleted_at`) VALUES (267, '', '个人中心', '', '', '/0/63/256/267', 'M', '', '', 256, '0', '', '', 0, '1', '1', '', 1, '2020-05-03 20:49:39', '2020-05-03 20:49:39', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (2, 'Upms', '系统管理', 'example', '/upms', '/0/2', 'M', '无', '', 0, '1', '', 'Layout', 5, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-07-14 13:23:18', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (3, 'Sysuser', '用户管理', 'user', 'sysuser', '/0/2/3', 'C', '无', 'system:sysuser:list', 2, NULL, NULL, '/system/sysuser/index', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-07-14 00:26:53', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (43, NULL, '新增用户', NULL, '/api/v1/sysuser', '/0/2/3/43', 'F', 'POST', 'system:sysuser:add', 3, NULL, NULL, NULL, 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (44, NULL, '查询用户', NULL, '/api/v1/sysuser', '/0/2/3/44', 'F', 'GET', 'system:sysuser:query', 3, NULL, NULL, NULL, 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (45, NULL, '修改用户', NULL, '/api/v1/sysuser/', '/0/2/3/45', 'F', 'PUT', 'system:sysuser:edit', 3, NULL, NULL, NULL, 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (46, NULL, '删除用户', NULL, '/api/v1/sysuser/', '/0/2/3/46', 'F', 'DELETE', 'system:sysuser:remove', 3, NULL, NULL, NULL, 0, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 15:32:45', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (51, 'Menu', '菜单管理', 'tree-table', 'menu', '/0/2/51', 'C', '无', 'system:sysmenu:list', 2, '1', '', '/system/menu/index', 5, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-07-14 00:28:03', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (52, 'Role', '角色管理', 'peoples', 'role', '/0/2/52', 'C', '无', 'system:sysrole:list', 2, '1', '', '/system/role/index', 2, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-07-14 00:27:30', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (56, 'Dept', '部门管理', 'tree', 'dept', '/0/2/56', 'C', '无', 'system:sysdept:list', 2, '0', '', '/system/dept/index', 4, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-07-14 00:28:08', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (57, 'post', '岗位管理', 'pass', 'post', '/0/2/57', 'C', '无', 'system:syspost:list', 2, '0', '', '/system/post/index', 3, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-07-14 00:28:20', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (63, '', '接口权限', 'bug', '', '/0/63', 'M', '', '', 0, '0', '', '', 99, '1', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 16:39:32', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (64, '', '用户管理', 'user', '', '/0/63/64', 'M', '', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (66, '', '菜单管理', 'tree-table', '', '/0/63/66', 'C', '', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (67, '', '菜单列表', 'tree-table', '/api/v1/menulist', '/0/63/66/67', 'A', 'GET', '', 66, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (68, '', '新建菜单', 'tree', '/api/v1/menu', '/0/63/66/68', 'A', 'POST', '', 66, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (72, '', '修改菜单', 'bug', '/api/v1/menu', '/0/63/66/72', 'A', 'PUT', '', 66, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (73, '', '删除菜单', 'bug', '/api/v1/menu/:id', '/0/63/66/73', 'A', 'DELETE', '', 66, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (74, NULL, '管理员列表', 'bug', '/api/v1/sysUserList', '/0/63/64/74', 'A', 'GET', NULL, 64, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (75, NULL, '根据id获取管理员', 'bug', '/api/v1/sysUser/:id', '/0/63/64/75', 'A', 'GET', NULL, 64, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (76, NULL, '获取管理员', 'bug', '/api/v1/sysUser/', '/0/63/64/76', 'A', 'GET', NULL, 64, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (77, NULL, '创建管理员', 'bug', '/api/v1/sysUser', '/0/63/64/77', 'A', 'POST', NULL, 64, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (78, NULL, '修改管理员', 'bug', '/api/v1/sysUser', '/0/63/64/78', 'A', 'PUT', NULL, 64, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (79, NULL, '删除管理员', 'bug', '/api/v1/sysUser/:id', '/0/63/64/79', 'A', 'DELETE', NULL, 64, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (80, NULL, '当前用户个人信息', 'bug', '/api/v1/user/profile', '/0/63/256/267/80', 'A', 'GET', NULL, 267, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', '2020-05-03 20:50:40', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (81, NULL, '角色列表', 'bug', '/api/v1/rolelist', '/0/63/201/81', 'A', 'GET', NULL, 201, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (82, NULL, '获取角色信息', 'bug', '/api/v1/role/:id', '/0/63/201/82', 'A', 'GET', NULL, 201, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (83, NULL, '创建角色', 'bug', '/api/v1/role', '/0/63/201/83', 'A', 'POST', NULL, 201, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (84, NULL, '修改角色', 'bug', '/api/v1/role', '/0/63/201/84', 'A', 'PUT', NULL, 201, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (85, NULL, '删除角色', 'bug', '/api/v1/role/:id', '/0/63/201/85', 'A', 'DELETE', NULL, 201, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (92, NULL, '获取角色菜单', 'bug', '/api/v1/menurole', '/0/63/201/92', 'A', 'GET', NULL, 201, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (93, NULL, '根据角色id获取角色', 'bug', '/api/v1/roleMenuTreeselect/:id', '/0/63/201/93', 'A', 'GET', NULL, 201, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (94, NULL, '获取菜单树', 'bug', '/api/v1/menuTreeselect', '/0/63/256/94', 'A', 'GET', NULL, 256, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', '2020-05-03 20:52:11', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (95, NULL, '获取角色菜单', 'bug', '/api/v1/rolemenu', '/0/63/205/95', 'A', 'GET', NULL, 205, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (96, NULL, '创建角色菜单', 'bug', '/api/v1/rolemenu', '/0/63/205/96', 'A', 'POST', NULL, 205, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (97, NULL, '删除用户菜单数据', 'bug', '/api/v1/rolemenu/:id', '/0/63/205/97', 'A', 'DELETE', NULL, 205, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (103, NULL, '部门菜单列表', 'bug', '/api/v1/deptList', '/0/63/203/103', 'A', 'GET', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (104, NULL, '根据id获取部门信息', 'bug', '/api/v1/dept/:id', '/0/63/203/104', 'A', 'GET', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (105, NULL, '创建部门', 'bug', '/api/v1/dept', '/0/63/203/105', 'A', 'POST', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (106, NULL, '修改部门', 'bug', '/api/v1/dept', '/0/63/203/106', 'A', 'PUT', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (107, NULL, '删除部门', 'bug', '/api/v1/dept/:id', '/0/63/203/107', 'A', 'DELETE', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (119, NULL, '获取岗位列表', 'bug', '/api/v1/postlist', '/0/63/204/119', 'A', 'GET', NULL, 204, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (120, NULL, '通过id获取岗位信息', 'bug', '/api/v1/post/:id', '/0/63/204/120', 'A', 'GET', NULL, 204, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (121, NULL, '创建岗位', 'bug', '/api/v1/post', '/0/63/204/121', 'A', 'POST', NULL, 204, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (122, NULL, '修改岗位', 'bug', '/api/v1/post', '/0/63/204/122', 'A', 'PUT', NULL, 204, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (123, NULL, '删除岗位', 'bug', '/api/v1/post/:id', '/0/63/204/123', 'A', 'DELETE', NULL, 204, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (137, NULL, '菜单列表', 'bug', '/api/v1/menulist', '/0/63/66/137', 'A', 'GET', NULL, 66, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (138, NULL, '获取根据id菜单信息', 'bug', '/api/v1/menu/:id', '/0/63/66/138', 'A', 'GET', NULL, 66, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (139, NULL, '创建菜单', 'bug', '/api/v1/menu', '/0/63/66/139', 'A', 'POST', NULL, 66, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (140, NULL, '修改菜单', 'bug', '/api/v1/menu/:id', '/0/63/66/140', 'A', 'PUT', NULL, 66, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (141, NULL, '删除菜单', 'bug', '/api/v1/menu/:id', '', 'A', 'DELETE', NULL, 66, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (142, NULL, '获取角色对应的菜单id数组', 'bug', '/api/v1/menuids', '/0/63/256/142', 'A', 'GET', NULL, 256, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (201, '', '角色管理', 'peoples', '', '/0/63/201', 'C', 'GET', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (203, '', '部门管理', 'tree', '', '/0/63/203', 'C', 'POST', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (204, '', '岗位管理', 'pass', '', '/0/63/204', 'C', '', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (205, '', '角色菜单管理', 'nested', '', '/0/63/205', 'C', '', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (212, 'LoginLog', '登录日志', 'logininfor', '/loginlog', '/0/2/212', 'C', '', 'system:sysloginlog:list', 2, '0', '', '/system/loginlog/index', 6, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-07-14 00:28:13', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (213, NULL, '获取登录日志', 'bug', '/api/v1/loginloglist', '/0/63/214/213', 'A', 'GET', NULL, 214, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (214, '', '日志管理', 'log', '', '/0/63/214', 'M', 'GET', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (215, '', '删除日志', 'bug', '/api/v1/loginlog/:id', '/0/63/214/215', 'A', 'DELETE', '', 214, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (220, '', '新增菜单', '', '', '/0/2/51/220', 'F', '', 'system:sysmenu:add', 51, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (221, '', '修改菜单', 'edit', '', '/0/2/51/221', 'F', '', 'system:sysmenu:edit', 51, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (222, '', '查询菜单', 'search', '', '/0/2/51/222', 'F', '', 'system:sysmenu:query', 51, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (223, '', '删除菜单', '', '', '/0/2/51/223', 'F', '', 'system:sysmenu:remove', 51, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (224, '', '新增角色', '', '', '/0/2/52/224', 'F', '', 'system:sysrole:add', 52, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (225, '', '查询角色', '', '', '/0/2/52/225', 'F', '', 'system:sysrole:query', 52, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (226, '', '修改角色', '', '', '/0/2/52/226', 'F', '', 'system:sysrole:edit', 52, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (227, '', '删除角色', '', '', '/0/2/52/227', 'F', '', 'system:sysrole:remove', 52, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (228, '', '查询部门', '', '', '/0/2/56/228', 'F', '', 'system:sysdept:query', 56, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (229, '', '新增部门', '', '', '/0/2/56/229', 'F', '', 'system:sysdept:add', 56, '0', '', '', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (230, '', '修改部门', '', '', '/0/2/56/230', 'F', '', 'system:sysdept:edit', 56, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (231, '', '删除部门', '', '', '/0/2/56/231', 'F', '', 'system:sysdept:remove', 56, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (232, '', '查询岗位', '', '', '/0/2/57/232', 'F', '', 'system:syspost:query', 57, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (233, '', '新增岗位', '', '', '/0/2/57/233', 'F', '', 'system:syspost:add', 57, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (234, '', '修改岗位', '', '', '/0/2/57/234', 'F', '', 'system:syspost:edit', 57, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (235, '', '删除岗位', '', '', '/0/2/57/235', 'F', '', 'system:syspost:remove', 57, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (244, '', '查询参数', '', '', '/0/2/62/244', 'F', '', 'system:sysconfig:query', 62, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (245, '', '新增参数', '', '', '/0/2/62/245', 'F', '', 'system:sysconfig:add', 62, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (246, '', '修改参数', '', '', '/0/2/62/246', 'F', '', 'system:sysconfig:edit', 62, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (247, '', '删除参数', '', '', '/0/2/62/247', 'F', '', 'system:sysconfig:remove', 62, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (248, '', '查询登录日志', '', '', '/0/2/211/212/248', 'F', '', 'system:sysloginlog:query', 212, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (249, '', '删除登录日志', '', '', '/0/2/211/212/249', 'F', '', 'system:sysloginlog:remove', 212, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (250, '', '查询操作日志', '', '', '/0/2/211/216/250', 'F', '', 'system:sysoperlog:query', 216, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (251, '', '删除操作日志', '', '', '/0/2/211/216/251', 'F', '', 'system:sysoperlog:remove', 216, '0', '', '', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (252, '', '获取登录用户信息', '', '/api/v1/getinfo', '/0/63/256/252', 'A', 'GET', '', 256, '0', '', '', 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (253, '', '角色数据权限', '', '/api/v1/roledatascope', '/0/63/201/253', 'A', 'PUT', '', 201, '0', '', '', 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (254, '', '部门树接口【数据权限】', '', '/api/v1/roleDeptTreeselect/:id', '/0/63/256/254', 'A', 'GET', '', 256, '0', '', '', 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (255, '', '部门树【用户列表】', '', '/api/v1/deptTree', '/0/63/256/255', 'A', 'GET', '', 256, '0', '', '', 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (256, '', '必开接口', '', '', '/0/63/256', 'M', 'GET', '', 63, '0', '', '', 0, '1', '1', '', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (258, '', '退出登录', '', '/api/v1/logout', '/0/63/256/258', 'A', 'POST', '', 256, '0', '', '', 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (259, '', '头像上传', '', '/api/v1/user/avatar', '/0/63/256/267/259', 'A', 'POST', '', 267, '0', '', '', 0, '1', '1', '1', 0, '2020-04-11 15:52:48', '2020-05-03 20:50:05', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (260, '', '修改密码', '', '/api/v1/user/pwd', '/0/63/256/260', 'A', 'PUT', '', 256, '0', '', '', 0, '1', '1', '', 0, '2020-04-11 15:52:48', NULL, NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (267, '', '个人中心', '', '', '/0/63/256/267', 'M', '', '', 256, '0', '', '', 0, '1', '1', '', 1, '2020-05-03 20:49:39', '2020-05-03 20:49:39', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (268, 'Process', '流程中心', 'date-range', '/process', '/0/268', 'M', '', '', 0, '0', '', 'Layout', 1, '0', '1', '1', 1, '2020-07-14 10:36:40', '2020-07-14 13:23:27', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (269, 'ApplyProcessList', '流程申请', 'form', '/process/apply-process-list', '/0/268/269', 'C', '', 'process:list:applyProcessList', 268, '0', '', '/process/list/apply-process-list', 0, '0', '1', '1', 1, '2020-07-14 10:41:54', '2020-07-14 10:56:52', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (270, 'ProcessUpcoming', '我的待办', 'dict', '/process/upcoming', '/0/268/270', 'C', '', 'process:list:upcoming', 268, '0', '', '/process/list/upcoming', 5, '0', '1', '', 1, '2020-07-14 10:54:44', '2020-07-14 10:54:44', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (271, 'ProcessMyCreate', '我创建的', 'row', '/process/my-create', '/0/268/271', 'C', '', 'process:list:myCreate', 268, '0', '', '/process/list/my-create', 10, '0', '1', '1', 1, '2020-07-14 10:56:35', '2020-07-14 11:00:44', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (272, 'ProcessRelated', '我相关的', 'excel', '/process/related', '/0/268/272', 'C', '', 'process:list:related', 268, '0', '', '/process/list/related', 15, '0', '1', '1', 1, '2020-07-14 10:58:10', '2020-07-14 11:00:56', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (273, 'ProcessAll', '所有申请', 'nested', '/process/all', '/0/268/273', 'C', '', 'process:list:all', 268, '0', '', '/process/list/all', 20, '0', '1', '1', 1, '2020-07-14 11:00:31', '2020-07-14 11:56:41', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (274, 'ProcessAdmin', '后台管理', 'lock', '/process-admin', '/0/268/274', 'M', '', '', 268, '0', '', '/menu-nesting/index', 25, '0', '1', '1', 1, '2020-07-14 11:56:11', '2020-07-14 12:23:14', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (275, 'ProcessAdminClassify', '流程分类', 'clipboard', '/process/admin/classify', '/0/268/274/275', 'C', '', 'process:admin:classify', 274, '0', '', '/process/admin/classify', 0, '0', '1', '', 1, '2020-07-14 12:01:04', '2020-07-14 12:01:04', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (276, 'ProcessAdminTemplate', '模版管理', 'component', '/process/admin/template-manager', '/0/268/274/276', 'C', '', 'process:admin:template', 274, '0', '', '/process/admin/template-manager', 5, '0', '1', '1', 1, '2020-07-14 12:05:17', '2020-07-14 12:08:11', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (277, 'ProcessAdminManager', '流程管理', 'time-range', '/process/admin/process-manager', '/0/268/274/277', 'C', '', ':process:admin:manager', 274, '0', '', '/process/admin/process-manager', 10, '0', '1', '', 1, '2020-07-14 12:07:17', '2020-07-14 12:07:17', NULL); +INSERT INTO `sys_menu`(`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `create_by`, `update_by`, `is_frame`, `create_time`, `update_time`, `delete_time`) VALUES (278, 'ProcessAdminTask', '任务管理', 'checkbox', '/process/admin/task-manager', '/0/268/274/278', 'C', '', 'process:admin:task', 274, '0', '', '/process/admin/task-manager', 15, '0', '1', '', 1, '2020-07-14 12:09:26', '2020-07-14 12:09:26', NULL); COMMIT; BEGIN; @@ -215,95 +226,6 @@ INSERT INTO `sys_role` VALUES (3, '测试角色', 0, 'Tester', 3, '', '1', NULL, COMMIT; BEGIN; -INSERT INTO `sys_role_menu` VALUES (2, 2, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 3, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 44, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 51, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 52, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 63, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 64, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 66, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 67, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 68, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 69, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 70, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 71, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 72, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 73, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 74, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 75, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 76, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 77, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 78, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 79, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 80, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 81, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 82, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 83, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 84, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 85, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 86, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 87, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 88, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 89, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 90, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 91, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 92, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 93, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 94, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 95, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 96, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 97, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 103, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 104, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 105, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 106, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 107, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 108, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 109, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 110, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 111, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 112, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 113, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 114, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 115, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 116, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 117, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 118, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 119, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 120, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 121, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 122, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 123, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 137, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 138, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 139, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 140, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 141, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 142, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 201, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 202, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 203, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 204, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 205, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 206, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 213, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 214, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 215, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 217, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 222, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 225, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 252, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 253, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 254, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 255, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 256, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 257, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 258, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 259, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 260, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 263, 'common', NULL, NULL); -INSERT INTO `sys_role_menu` VALUES (2, 267, 'common', NULL, NULL); INSERT INTO `sys_role_menu` VALUES (1, 2, 'admin', NULL, NULL); INSERT INTO `sys_role_menu` VALUES (1, 3, 'admin', NULL, NULL); INSERT INTO `sys_role_menu` VALUES (1, 43, 'admin', NULL, NULL); diff --git a/handler/auth.go b/handler/auth.go index f18d3e5..77e5424 100644 --- a/handler/auth.go +++ b/handler/auth.go @@ -1,7 +1,7 @@ package handler import ( - "ferry/models" + "ferry/models/system" jwt "ferry/pkg/jwtauth" "ferry/tools" "net/http" @@ -16,8 +16,8 @@ var store = base64Captcha.DefaultMemStore func PayloadFunc(data interface{}) jwt.MapClaims { if v, ok := data.(map[string]interface{}); ok { - u, _ := v["user"].(models.SysUser) - r, _ := v["role"].(models.SysRole) + u, _ := v["user"].(system.SysUser) + r, _ := v["role"].(system.SysRole) return jwt.MapClaims{ jwt.IdentityKey: u.UserId, jwt.RoleIdKey: r.RoleId, @@ -53,8 +53,8 @@ func IdentityHandler(c *gin.Context) interface{} { // @Success 200 {string} string "{"code": 200, "expire": "2019-08-07T12:45:48+08:00", "token": ".eyJleHAiOjE1NjUxNTMxNDgsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTU2NTE0OTU0OH0.-zvzHvbg0A" }" // @Router /login [post] func Authenticator(c *gin.Context) (interface{}, error) { - var loginVals models.Login - var loginlog models.LoginLog + var loginVals system.Login + var loginlog system.LoginLog ua := user_agent.New(c.Request.UserAgent()) loginlog.Ipaddr = c.ClientIP() @@ -108,7 +108,7 @@ func Authenticator(c *gin.Context) (interface{}, error) { // @Router /logout [post] // @Security func LogOut(c *gin.Context) { - var loginlog models.LoginLog + var loginlog system.LoginLog ua := user_agent.New(c.Request.UserAgent()) loginlog.Ipaddr = c.ClientIP() location := tools.GetLocation(c.ClientIP()) @@ -133,8 +133,8 @@ func LogOut(c *gin.Context) { func Authorizator(data interface{}, c *gin.Context) bool { if v, ok := data.(map[string]interface{}); ok { - u, _ := v["user"].(models.SysUser) - r, _ := v["role"].(models.SysRole) + u, _ := v["user"].(system.SysUser) + r, _ := v["role"].(system.SysRole) c.Set("role", r.RoleName) c.Set("roleIds", r.RoleId) c.Set("userId", u.UserId) diff --git a/models/base/base.go b/models/base/base.go new file mode 100644 index 0000000..c31beb5 --- /dev/null +++ b/models/base/base.go @@ -0,0 +1,16 @@ +/* + @Author : lanyulei +*/ + +package base + +import ( + "ferry/pkg/jsonTime" +) + +type Model struct { + Id int `gorm:"primary_key;AUTO_INCREMENT;column:id" json:"id" form:"id"` + CreatedAt jsonTime.JSONTime `gorm:"column:create_time" json:"create_time" form:"create_time"` + UpdatedAt jsonTime.JSONTime `gorm:"column:update_time" json:"update_time" form:"update_time"` + DeletedAt *jsonTime.JSONTime `gorm:"column:delete_time" sql:"index" json:"-"` +} diff --git a/models/gorm/gorm.go b/models/gorm/gorm.go index cdf5cd9..51496c9 100644 --- a/models/gorm/gorm.go +++ b/models/gorm/gorm.go @@ -1,8 +1,7 @@ package gorm import ( - "ferry/models" - "ferry/models/tools" + "ferry/models/system" "github.com/jinzhu/gorm" ) @@ -10,16 +9,17 @@ import ( func AutoMigrate(db *gorm.DB) error { db.SingularTable(true) return db.AutoMigrate( - new(models.CasbinRule), - new(tools.SysTables), - new(tools.SysColumns), - new(models.Dept), - new(models.Menu), - new(models.LoginLog), - new(models.RoleMenu), - new(models.SysRoleDept), - new(models.SysUser), - new(models.SysRole), - new(models.Post), + // 系统管理 + &system.CasbinRule{}, + &system.Dept{}, + &system.Menu{}, + &system.LoginLog{}, + &system.RoleMenu{}, + &system.SysRoleDept{}, + &system.SysUser{}, + &system.SysRole{}, + &system.Post{}, + // 流程中心 + ).Error } diff --git a/models/model.go b/models/model.go deleted file mode 100644 index 1293241..0000000 --- a/models/model.go +++ /dev/null @@ -1,11 +0,0 @@ -package models - -import ( - "time" -) - -type BaseModel struct { - CreatedAt time.Time `json:"createdAt"` - UpdatedAt time.Time `json:"updatedAt"` - DeletedAt *time.Time `sql:"index" json:"deletedAt"` -} diff --git a/models/process/process/classify.go b/models/process/process/classify.go new file mode 100644 index 0000000..cdb6601 --- /dev/null +++ b/models/process/process/classify.go @@ -0,0 +1,20 @@ +package process + +import ( + "ferry/models/base" +) + +/* + @Author : lanyulei +*/ + +// 流程分类 +type Classify struct { + base.Model + Name string `gorm:"column:name; type: varchar(128)" json:"name" form:"name"` // 分类名称 + Creator int `gorm:"column:creator; type: int(11)" json:"creator" form:"creator"` // 创建者 +} + +func (Classify) TableName() string { + return "process_classify" +} diff --git a/models/process/process/process.go b/models/process/process/process.go new file mode 100644 index 0000000..024851a --- /dev/null +++ b/models/process/process/process.go @@ -0,0 +1,25 @@ +package process + +import ( + "encoding/json" + "ferry/models/base" +) + +/* + @Author : lanyulei +*/ + +// 流程 +type Info struct { + base.Model + Name string `gorm:"column:name; type:varchar(128)" json:"name" form:"name"` // 流程名称 + Structure json.RawMessage `gorm:"column:structure; type:json" json:"structure" form:"structure"` // 流程结构 + Classify int `gorm:"column:classify; type:int(11)" json:"classify" form:"classify"` // 分类ID + Tpls json.RawMessage `gorm:"column:tpls; type:json" json:"tpls" form:"tpls"` // 模版 + Task json.RawMessage `gorm:"column:task; type:json" json:"task" form:"task"` // 任务ID, array, 可执行多个任务,可以当成通知任务,每个节点都会去执行 + Creator int `gorm:"column:creator; type:int(11)" json:"creator" form:"creator"` // 创建者 +} + +func (Info) TableName() string { + return "process_info" +} diff --git a/models/process/task/history.go b/models/process/task/history.go new file mode 100644 index 0000000..68c434b --- /dev/null +++ b/models/process/task/history.go @@ -0,0 +1,23 @@ +package task + +import ( + "ferry/models/base" +) + +/* + @Author : lanyulei +*/ + +// 任务 +type History struct { + base.Model + Task int `gorm:"column:task; type: int(11)" json:"task" form:"task"` // 任务ID + Name string `gorm:"column:name; type: varchar(256)" json:"name" form:"name"` // 任务名称 + TaskType int `gorm:"column:task_type; type: int(11)" json:"task_type" form:"task_type"` // 任务类型, python, shell + ExecutionTime string `gorm:"column:execution_time; type: varchar(128)" json:"execution_time" form:"execution_time"` // 执行时间 + Result string `gorm:"column:result; type: longtext" json:"result" form:"result"` // 任务返回 +} + +func (History) TableName() string { + return "task_history" +} diff --git a/models/process/task/task.go b/models/process/task/task.go new file mode 100644 index 0000000..32d687d --- /dev/null +++ b/models/process/task/task.go @@ -0,0 +1,23 @@ +package task + +import ( + "ferry/models/base" +) + +/* + @Author : lanyulei +*/ + +// 任务 +type Info struct { + base.Model + Name string `gorm:"column:name; type: varchar(256)" json:"name" form:"name"` // 任务名称 + TaskType string `gorm:"column:task_type; type: varchar(45)" json:"task_type" form:"task_type"` // 任务类型 + Content string `gorm:"column:content; type: longtext" json:"content" form:"content"` // 任务内容 + Creator int `gorm:"column:creator; type: int(11)" json:"creator" form:"creator"` // 创建者 + Remarks string `gorm:"column:remarks; type: longtext" json:"remarks" form:"remarks"` // 备注 +} + +func (Info) TableName() string { + return "task_info" +} diff --git a/models/process/tpl/tpl.go b/models/process/tpl/tpl.go new file mode 100644 index 0000000..024a3ec --- /dev/null +++ b/models/process/tpl/tpl.go @@ -0,0 +1,23 @@ +package tpl + +import ( + "encoding/json" + "ferry/models/base" +) + +/* + @Author : lanyulei +*/ + +// 模板 +type Info struct { + base.Model + Name string `gorm:"column:name; type: varchar(128)" json:"name" form:"name" binding:"required"` // 模板名称 + FormStructure json.RawMessage `gorm:"column:form_structure; type: json" json:"form_structure" form:"form_structure" binding:"required"` // 表单结构 + Creator int `gorm:"column:creator; type: int(11)" json:"creator" form:"creator"` // 创建者 + Remarks string `gorm:"column:remarks; type: longtext" json:"remarks" form:"remarks"` // 备注 +} + +func (Info) TableName() string { + return "tpl_info" +} diff --git a/models/process/workOrder/circulationHistory.go b/models/process/workOrder/circulationHistory.go new file mode 100644 index 0000000..4e1fc4c --- /dev/null +++ b/models/process/workOrder/circulationHistory.go @@ -0,0 +1,28 @@ +package workOrder + +import ( + "ferry/models/base" +) + +/* + @Author : lanyulei +*/ + +// 工单流转历史 +type CirculationHistory struct { + base.Model + Title string `gorm:"column:title; type: varchar(128)" json:"title" form:"title"` // 工单标题 + WorkOrder int `gorm:"column:work_order; type: int(11)" json:"work_order" form:"work_order"` // 工单ID + State string `gorm:"column:state; type: varchar(128)" json:"state" form:"state"` // 工单状态 + Source string `gorm:"column:source; type: varchar(128)" json:"source" form:"source"` // 源节点ID + Target string `gorm:"column:target; type: varchar(128)" json:"target" form:"target"` // 目标节点ID + Circulation string `gorm:"column:circulation; type: varchar(128)" json:"circulation" form:"circulation"` // 流转ID + Processor string `gorm:"column:processor; type: varchar(45)" json:"processor" form:"processor"` // 处理人 + ProcessorId int `gorm:"column:processor_id; type: int(11)" json:"processor_id" form:"processor_id"` // 处理人ID + CostDuration string `gorm:"column:cost_duration; type: varchar(128)" json:"cost_duration" form:"cost_duration"` // 处理时长 + Remarks string `gorm:"column:remarks; type: longtext" json:"remarks" form:"remarks"` // 备注 +} + +func (CirculationHistory) TableName() string { + return "work_order_circulation_history" +} diff --git a/models/process/workOrder/tplData.go b/models/process/workOrder/tplData.go new file mode 100644 index 0000000..6b6d513 --- /dev/null +++ b/models/process/workOrder/tplData.go @@ -0,0 +1,22 @@ +package workOrder + +import ( + "encoding/json" + "ferry/models/base" +) + +/* + @Author : lanyulei +*/ + +// 工单绑定模版数据 +type TplData struct { + base.Model + WorkOrder int `gorm:"column:work_order; type: int(11)" json:"work_order" form:"work_order"` // 工单ID + FormStructure json.RawMessage `gorm:"column:form_structure; type: json" json:"form_structure" form:"form_structure"` // 表单结构 + FormData json.RawMessage `gorm:"column:form_data; type: json" json:"form_data" form:"form_data"` // 表单数据 +} + +func (TplData) TableName() string { + return "work_order_tpl_data" +} diff --git a/models/process/workOrder/workOrder.go b/models/process/workOrder/workOrder.go new file mode 100644 index 0000000..643efaf --- /dev/null +++ b/models/process/workOrder/workOrder.go @@ -0,0 +1,26 @@ +package workOrder + +import ( + "encoding/json" + "ferry/models/base" +) + +/* + @Author : lanyulei +*/ + +// 工单 +type Info struct { + base.Model + Title string `gorm:"column:title; type:varchar(128)" json:"title" form:"title"` // 工单标题 + Process int `gorm:"column:process; type:int(11)" json:"process" form:"process"` // 流程ID + Classify int `gorm:"column:classify; type:int(11)" json:"classify" form:"classify"` // 分类ID + IsEnd int `gorm:"column:is_end; type:int(11); default:0" json:"is_end" form:"is_end"` // 是否结束, 0 未结束,1 已结束 + State json.RawMessage `gorm:"column:state; type:json" json:"state" form:"state"` // 状态信息 + RelatedPerson json.RawMessage `gorm:"column:related_person; type:json" json:"related_person" form:"related_person"` // 工单所有处理人 + Creator int `gorm:"column:creator; type:int(11)" json:"creator" form:"creator"` // 创建人 +} + +func (Info) TableName() string { + return "work_order_info" +} diff --git a/models/casbinrule.go b/models/system/casbinrule.go similarity index 89% rename from models/casbinrule.go rename to models/system/casbinrule.go index 1ed1e30..2a69262 100644 --- a/models/casbinrule.go +++ b/models/system/casbinrule.go @@ -1,4 +1,6 @@ -package models +package system + +import "ferry/models/base" //casbin_rule type CasbinRule struct { @@ -9,6 +11,7 @@ type CasbinRule struct { V3 string `json:"v3" gorm:"type:varchar(100);"` V4 string `json:"v4" gorm:"type:varchar(100);"` V5 string `json:"v5" gorm:"type:varchar(100);"` + base.Model } func (CasbinRule) TableName() string { diff --git a/models/datascope.go b/models/system/datascope.go similarity index 98% rename from models/datascope.go rename to models/system/datascope.go index 3cfd59c..9e3b09f 100644 --- a/models/datascope.go +++ b/models/system/datascope.go @@ -1,4 +1,4 @@ -package models +package system import ( "errors" diff --git a/models/dept.go b/models/system/dept.go similarity index 99% rename from models/dept.go rename to models/system/dept.go index d9f9b60..98b2701 100644 --- a/models/dept.go +++ b/models/system/dept.go @@ -1,8 +1,9 @@ -package models +package system import ( "errors" "ferry/global/orm" + "ferry/models/base" "ferry/tools" _ "time" ) @@ -22,7 +23,7 @@ type Dept struct { DataScope string `json:"dataScope" gorm:"-"` Params string `json:"params" gorm:"-"` Children []Dept `json:"children" gorm:"-"` - BaseModel + base.Model } func (Dept) TableName() string { diff --git a/models/initdb.go b/models/system/initdb.go similarity index 98% rename from models/initdb.go rename to models/system/initdb.go index a7ed293..c9b1ff9 100644 --- a/models/initdb.go +++ b/models/system/initdb.go @@ -1,4 +1,4 @@ -package models +package system import ( "ferry/global/orm" diff --git a/models/login.go b/models/system/login.go similarity index 98% rename from models/login.go rename to models/system/login.go index 99347c7..cdd3bbb 100644 --- a/models/login.go +++ b/models/system/login.go @@ -1,4 +1,4 @@ -package models +package system import ( "ferry/global/orm" diff --git a/models/loginlog.go b/models/system/loginlog.go similarity index 96% rename from models/loginlog.go rename to models/system/loginlog.go index ba0b51c..a1e4ad7 100644 --- a/models/loginlog.go +++ b/models/system/loginlog.go @@ -1,7 +1,8 @@ -package models +package system import ( "ferry/global/orm" + "ferry/models/base" "time" ) @@ -21,7 +22,7 @@ type LoginLog struct { Params string `json:"params" gorm:"-"` // Remark string `json:"remark" gorm:"type:varchar(255);"` //备注 Msg string `json:"msg" gorm:"type:varchar(255);"` - BaseModel + base.Model } func (LoginLog) TableName() string { @@ -64,7 +65,7 @@ func (e *LoginLog) GetPage(pageSize int, pageIndex int) ([]LoginLog, int, error) if err := table.Order("info_id desc").Offset((pageIndex - 1) * pageSize).Limit(pageSize).Find(&doc).Error; err != nil { return nil, 0, err } - table.Where("`deleted_at` IS NULL").Count(&count) + table.Where("`delete_time` IS NULL").Count(&count) return doc, count, nil } diff --git a/models/menu.go b/models/system/menu.go similarity index 99% rename from models/menu.go rename to models/system/menu.go index 899b87c..83327cb 100644 --- a/models/menu.go +++ b/models/system/menu.go @@ -1,8 +1,9 @@ -package models +package system import ( "errors" "ferry/global/orm" + "ferry/models/base" "ferry/tools" ) @@ -30,7 +31,7 @@ type Menu struct { RoleId int `gorm:"-"` Children []Menu `json:"children" gorm:"-"` IsSelect bool `json:"is_select" gorm:"-"` - BaseModel + base.Model } func (Menu) TableName() string { @@ -65,7 +66,7 @@ type Menus struct { UpdateBy string `json:"updateBy" gorm:"column:update_by"` DataScope string `json:"dataScope" gorm:"-"` Params string `json:"params" gorm:"-"` - BaseModel + base.Model } func (Menus) TableName() string { diff --git a/models/post.go b/models/system/post.go similarity index 97% rename from models/post.go rename to models/system/post.go index a4ebfb8..0761a69 100644 --- a/models/post.go +++ b/models/system/post.go @@ -1,7 +1,8 @@ -package models +package system import ( "ferry/global/orm" + "ferry/models/base" "ferry/tools" ) @@ -16,7 +17,7 @@ type Post struct { UpdateBy string `gorm:"type:varchar(128);" json:"updateBy"` DataScope string `gorm:"-" json:"dataScope"` Params string `gorm:"-" json:"params"` - BaseModel + base.Model } func (Post) TableName() string { @@ -109,7 +110,7 @@ func (e *Post) GetPage(pageSize int, pageIndex int) ([]Post, int, error) { if err := table.Order("sort").Offset((pageIndex - 1) * pageSize).Limit(pageSize).Find(&doc).Error; err != nil { return nil, 0, err } - table.Where("`deleted_at` IS NULL").Count(&count) + table.Where("`delete_time` IS NULL").Count(&count) return doc, count, nil } diff --git a/models/role.go b/models/system/role.go similarity index 98% rename from models/role.go rename to models/system/role.go index 1c18e62..bc12a07 100644 --- a/models/role.go +++ b/models/system/role.go @@ -1,7 +1,8 @@ -package models +package system import ( "ferry/global/orm" + "ferry/models/base" "ferry/tools" "github.com/pkg/errors" @@ -22,7 +23,7 @@ type SysRole struct { Params string `json:"params" gorm:"-"` MenuIds []int `json:"menuIds" gorm:"-"` DeptIds []int `json:"deptIds" gorm:"-"` - BaseModel + base.Model } func (SysRole) TableName() string { @@ -62,7 +63,7 @@ func (e *SysRole) GetPage(pageSize int, pageIndex int) ([]SysRole, int, error) { if err := table.Order("role_sort").Offset((pageIndex - 1) * pageSize).Limit(pageSize).Find(&doc).Error; err != nil { return nil, 0, err } - table.Where("`deleted_at` IS NULL").Count(&count) + table.Where("`delete_time` IS NULL").Count(&count) return doc, count, nil } diff --git a/models/roledept.go b/models/system/roledept.go similarity index 98% rename from models/roledept.go rename to models/system/roledept.go index 0171e85..a3de1ae 100644 --- a/models/roledept.go +++ b/models/system/roledept.go @@ -1,4 +1,4 @@ -package models +package system import ( "ferry/global/orm" diff --git a/models/rolemenu.go b/models/system/rolemenu.go similarity index 98% rename from models/rolemenu.go rename to models/system/rolemenu.go index 46cc48f..03d2e32 100644 --- a/models/rolemenu.go +++ b/models/system/rolemenu.go @@ -1,7 +1,8 @@ -package models +package system import ( "ferry/global/orm" + "ferry/models/base" "ferry/tools" "fmt" ) @@ -12,6 +13,7 @@ type RoleMenu struct { RoleName string `gorm:"type:varchar(128)"` CreateBy string `gorm:"type:varchar(128)"` UpdateBy string `gorm:"type:varchar(128)"` + base.Model } func (RoleMenu) TableName() string { diff --git a/models/sysuser.go b/models/system/sysuser.go similarity index 98% rename from models/sysuser.go rename to models/system/sysuser.go index 1048248..d616e11 100644 --- a/models/sysuser.go +++ b/models/system/sysuser.go @@ -1,8 +1,9 @@ -package models +package system import ( "errors" "ferry/global/orm" + "ferry/models/base" "ferry/tools" "strings" @@ -56,8 +57,7 @@ type SysUserB struct { Status string `gorm:"type:int(1);" json:"status"` DataScope string `gorm:"-" json:"dataScope"` Params string `gorm:"-" json:"params"` - - BaseModel + base.Model } type SysUser struct { @@ -226,7 +226,7 @@ func (e *SysUser) GetPage(pageSize int, pageIndex int) ([]SysUserPage, int, erro if err := table.Offset((pageIndex - 1) * pageSize).Limit(pageSize).Find(&doc).Error; err != nil { return nil, 0, err } - table.Where("sys_user.deleted_at IS NULL").Count(&count) + table.Where("sys_user.delete_time IS NULL").Count(&count) return doc, count, nil } diff --git a/models/tools/dbcolumns.go b/models/tools/dbcolumns.go deleted file mode 100644 index f08821c..0000000 --- a/models/tools/dbcolumns.go +++ /dev/null @@ -1,61 +0,0 @@ -package tools - -import ( - "errors" - "ferry/global/orm" - config2 "ferry/tools/config" -) - -type DBColumns struct { - TableSchema string `gorm:"column:TABLE_SCHEMA" json:"tableSchema"` - TableName string `gorm:"column:TABLE_NAME" json:"tableName"` - ColumnName string `gorm:"column:COLUMN_NAME" json:"columnName"` - ColumnDefault string `gorm:"column:COLUMN_DEFAULT" json:"columnDefault"` - IsNullable string `gorm:"column:IS_NULLABLE" json:"isNullable"` - DataType string `gorm:"column:DATA_TYPE" json:"dataType"` - CharacterMaximumLength string `gorm:"column:CHARACTER_MAXIMUM_LENGTH" json:"characterMaximumLength"` - CharacterSetName string `gorm:"column:CHARACTER_SET_NAME" json:"characterSetName"` - ColumnType string `gorm:"column:COLUMN_TYPE" json:"columnType"` - ColumnKey string `gorm:"column:COLUMN_KEY" json:"columnKey"` - Extra string `gorm:"column:EXTRA" json:"extra"` - ColumnComment string `gorm:"column:COLUMN_COMMENT" json:"columnComment"` -} - -func (e *DBColumns) GetPage(pageSize int, pageIndex int) ([]DBColumns, int, error) { - var doc []DBColumns - - table := orm.Eloquent.Select("*").Table("information_schema.`COLUMNS`") - table = table.Where("table_schema= ? ", config2.DatabaseConfig.Name) - - if e.TableName != "" { - return nil, 0, errors.New("table name cannot be empty!") - } - - table = table.Where("TABLE_NAME = ?", e.TableName) - - var count int - - if err := table.Offset((pageIndex - 1) * pageSize).Limit(pageSize).Find(&doc).Error; err != nil { - return nil, 0, err - } - table.Count(&count) - return doc, count, nil -} - -func (e *DBColumns) GetList() ([]DBColumns, error) { - var doc []DBColumns - - table := orm.Eloquent.Select("*").Table("information_schema.columns") - table = table.Where("table_schema= ? ", config2.DatabaseConfig.Name) - - if e.TableName == "" { - return nil, errors.New("table name cannot be empty!") - } - - table = table.Where("TABLE_NAME = ?", e.TableName) - - if err := table.Find(&doc).Error; err != nil { - return doc, err - } - return doc, nil -} diff --git a/models/tools/dbtables.go b/models/tools/dbtables.go deleted file mode 100644 index d80f87a..0000000 --- a/models/tools/dbtables.go +++ /dev/null @@ -1,53 +0,0 @@ -package tools - -import ( - "errors" - "ferry/global/orm" - config2 "ferry/tools/config" -) - -type DBTables struct { - TableName string `gorm:"column:TABLE_NAME" json:"tableName"` - Engine string `gorm:"column:ENGINE" json:"engine"` - TableRows string `gorm:"column:TABLE_ROWS" json:"tableRows"` - TableCollation string `gorm:"column:TABLE_COLLATION" json:"tableCollation"` - CreateTime string `gorm:"column:CREATE_TIME" json:"createTime"` - UpdateTime string `gorm:"column:UPDATE_TIME" json:"updateTime"` - TableComment string `gorm:"column:TABLE_COMMENT" json:"tableComment"` -} - -func (e *DBTables) GetPage(pageSize int, pageIndex int) ([]DBTables, int, error) { - var doc []DBTables - - table := orm.Eloquent.Select("*").Table("information_schema.tables") - table = table.Where("TABLE_NAME not in (select table_name from " + config2.DatabaseConfig.Name + ".sys_tables) ") - table = table.Where("table_schema= ? ", config2.DatabaseConfig.Name) - - if e.TableName != "" { - table = table.Where("TABLE_NAME = ?", e.TableName) - } - - var count int - - if err := table.Offset((pageIndex - 1) * pageSize).Limit(pageSize).Find(&doc).Error; err != nil { - return nil, 0, err - } - table.Count(&count) - return doc, count, nil -} - -func (e *DBTables) Get() (DBTables, error) { - var doc DBTables - - table := orm.Eloquent.Select("*").Table("information_schema.tables") - table = table.Where("table_schema= ? ", config2.DatabaseConfig.Name) - if e.TableName == "" { - return doc, errors.New("table name cannot be empty!") - } - table = table.Where("TABLE_NAME = ?", e.TableName) - - if err := table.First(&doc).Error; err != nil { - return doc, err - } - return doc, nil -} diff --git a/models/tools/syscolumns.go b/models/tools/syscolumns.go deleted file mode 100644 index fa4438d..0000000 --- a/models/tools/syscolumns.go +++ /dev/null @@ -1,84 +0,0 @@ -package tools - -import ( - "ferry/global/orm" - "ferry/models" -) - -type SysColumns struct { - ColumnId int `gorm:"primary_key;auto_increment" json:"columnId"` - TableId int `gorm:"type:int(11);" json:"tableId"` - ColumnName string `gorm:"type:varchar(128);" json:"columnName"` - ColumnComment string `gorm:"column:column_comment;type:varchar(128);" json:"columnComment"` - ColumnType string `gorm:"column:column_type;type:varchar(128);" json:"columnType"` - GoType string `gorm:"column:go_type;type:varchar(128);" json:"goType"` - GoField string `gorm:"column:go_field;type:varchar(128);" json:"goField"` - JsonField string `gorm:"column:json_field;type:varchar(128);" json:"jsonField"` - IsPk string `gorm:"column:is_pk;type:char(4);" json:"isPk"` - IsIncrement string `gorm:"column:is_increment;type:char(4);" json:"isIncrement"` - IsRequired string `gorm:"column:is_required;type:char(4);" json:"isRequired"` - IsInsert string `gorm:"column:is_insert;type:char(4);" json:"isInsert"` - IsEdit string `gorm:"column:is_edit;type:char(4);" json:"isEdit"` - IsList string `gorm:"column:is_list;type:char(4);" json:"isList"` - IsQuery string `gorm:"column:is_query;type:char(4);" json:"isQuery"` - QueryType string `gorm:"column:query_type;type:varchar(128);" json:"queryType"` - HtmlType string `gorm:"column:html_type;type:varchar(128);" json:"htmlType"` - DictType string `gorm:"column:dict_type;type:varchar(128);" json:"dictType"` - Sort int `gorm:"column:sort;type:int(4);" json:"sort"` - List string `gorm:"column:list;type:char(1);" json:"list"` - Pk bool `gorm:"column:pk;type:char(1);" json:"pk"` - Required bool `gorm:"column:required;type:char(1);" json:"required"` - SuperColumn bool `gorm:"column:super_column;type:char(1);" json:"superColumn"` - UsableColumn bool `gorm:"column:usable_column;type:char(1);" json:"usableColumn"` - Increment bool `gorm:"column:increment;type:char(1);" json:"increment"` - Insert bool `gorm:"column:insert;type:char(1);" json:"insert"` - Edit bool `gorm:"column:edit;type:char(1);" json:"edit"` - Query bool `gorm:"column:query;type:char(1);" json:"query"` - Remark string `gorm:"column:remark;type:varchar(255);" json:"remark"` - CreateBy string `gorm:"column:create_by;type:varchar(128);" json:"createBy"` - UpdateBy string `gorm:"column:update_By;type:varchar(128);" json:"updateBy"` - - models.BaseModel -} - -func (SysColumns) TableName() string { - return "sys_columns" -} - -func (e *SysColumns) GetList() ([]SysColumns, error) { - var doc []SysColumns - - table := orm.Eloquent.Select("*").Table("sys_columns") - - table = table.Where("table_id = ?", e.TableId) - - if err := table.Find(&doc).Error; err != nil { - return nil, err - } - return doc, nil -} - -func (e *SysColumns) Create() (SysColumns, error) { - var doc SysColumns - result := orm.Eloquent.Table("sys_columns").Create(&e) - if result.Error != nil { - err := result.Error - return doc, err - } - doc = *e - return doc, nil -} - -func (e *SysColumns) Update() (update SysColumns, err error) { - if err = orm.Eloquent.Table("sys_columns").First(&update, e.ColumnId).Error; err != nil { - return - } - - //参数1:是要修改的数据 - //参数2:是修改的数据 - if err = orm.Eloquent.Table("sys_columns").Model(&update).Updates(&e).Error; err != nil { - return - } - - return -} diff --git a/models/tools/systables.go b/models/tools/systables.go deleted file mode 100644 index 41b73d4..0000000 --- a/models/tools/systables.go +++ /dev/null @@ -1,152 +0,0 @@ -package tools - -import ( - "ferry/global/orm" - "ferry/models" -) - -type SysTables struct { - TableId int `gorm:"primary_key;auto_increment" json:"tableId"` //表编码 - TBName string `gorm:"column:table_name;type:varchar(255);" json:"tableName"` //表名称 - TableComment string `gorm:"type:varchar(255);" json:"tableComment"` //表备注 - ClassName string `gorm:"type:varchar(255);" json:"className"` //类名 - TplCategory string `gorm:"type:varchar(255);" json:"tplCategory"` - PackageName string `gorm:"type:varchar(255);" json:"packageName"` //包名 - ModuleName string `gorm:"type:varchar(255);" json:"moduleName"` //模块名 - BusinessName string `gorm:"type:varchar(255);" json:"businessName"` - FunctionName string `gorm:"type:varchar(255);" json:"functionName"` //功能名称 - FunctionAuthor string `gorm:"type:varchar(255);" json:"functionAuthor"` //功能作者 - PkColumn string `gorm:"type:varchar(255);" json:"pkColumn"` - PkGoField string `gorm:"type:varchar(255);" json:"pkGoField"` - PkJsonField string `gorm:"type:varchar(255);" json:"pkJsonField"` - Options string `gorm:"type:varchar(255);" json:"options"` - TreeCode string `gorm:"type:varchar(255);" json:"treeCode"` - TreeParentCode string `gorm:"type:varchar(255);" json:"treeParentCode"` - TreeName string `gorm:"type:varchar(255);" json:"treeName"` - Tree bool `gorm:"type:char(1);" json:"tree"` - Crud bool `gorm:"type:char(1);" json:"crud"` - Remark string `gorm:"type:varchar(255);" json:"remark"` - IsLogicalDelete string `gorm:"type:char(1);" json:"isLogicalDelete"` - LogicalDelete bool `gorm:"type:char(1);" json:"logicalDelete"` - LogicalDeleteColumn string `gorm:"type:varchar(128);" json:"logicalDeleteColumn"` - CreateBy string `gorm:"type:varchar(128);" json:"createBy"` - UpdateBy string `gorm:"type:varchar(128);" json:"updateBy"` - DataScope string `gorm:"-" json:"dataScope"` - Params Params `gorm:"-" json:"params"` - Columns []SysColumns `gorm:"-" json:"columns"` - - models.BaseModel -} - -func (SysTables) TableName() string { - return "sys_tables" -} - -type Params struct { - TreeCode string `gorm:"-" json:"treeCode"` - TreeParentCode string `gorm:"-" json:"treeParentCode"` - TreeName string `gorm:"-" json:"treeName"` -} - -func (e *SysTables) GetPage(pageSize int, pageIndex int) ([]SysTables, int, error) { - var doc []SysTables - - table := orm.Eloquent.Select("*").Table("sys_tables") - - if e.TBName != "" { - table = table.Where("table_name = ?", e.TBName) - } - if e.TableComment != "" { - table = table.Where("table_comment = ?", e.TableComment) - } - - var count int - - if err := table.Offset((pageIndex - 1) * pageSize).Limit(pageSize).Find(&doc).Error; err != nil { - return nil, 0, err - } - table.Where("`deleted_at` IS NULL").Count(&count) - return doc, count, nil -} - -func (e *SysTables) Get() (SysTables, error) { - var doc SysTables - var err error - table := orm.Eloquent.Select("*").Table("sys_tables") - - if e.TBName != "" { - table = table.Where("table_name = ?", e.TBName) - } - if e.TableId != 0 { - table = table.Where("table_id = ?", e.TableId) - } - if e.TableComment != "" { - table = table.Where("table_comment = ?", e.TableComment) - } - - if err := table.First(&doc).Error; err != nil { - return doc, err - } - var col SysColumns - col.TableId = doc.TableId - if doc.Columns, err = col.GetList(); err != nil { - return doc, err - } - - return doc, nil -} - -func (e *SysTables) Create() (SysTables, error) { - var doc SysTables - result := orm.Eloquent.Table("sys_tables").Create(&e) - if result.Error != nil { - err := result.Error - return doc, err - } - doc = *e - for i := 0; i < len(e.Columns); i++ { - e.Columns[i].TableId = doc.TableId - - e.Columns[i].Create() - } - - return doc, nil -} - -func (e *SysTables) Update() (update SysTables, err error) { - if err = orm.Eloquent.Table("sys_tables").First(&update, e.TableId).Error; err != nil { - return - } - - //参数1:是要修改的数据 - //参数2:是修改的数据 - if err = orm.Eloquent.Table("sys_tables").Model(&update).Updates(&e).Error; err != nil { - return - } - - for i := 0; i < len(e.Columns); i++ { - _, _ = e.Columns[i].Update() - } - return -} - -func (e *SysTables) Delete() (success bool, err error) { - if err = orm.Eloquent.Table("sys_tables").Delete(SysTables{}, "table_id = ?", e.TableId).Error; err != nil { - success = false - return - } - if err = orm.Eloquent.Table("sys_columns").Delete(SysColumns{}, "table_id = ?", e.TableId).Error; err != nil { - success = false - return - } - success = true - return -} - -func (e *SysTables) BatchDelete(id []int) (Result bool, err error) { - if err = orm.Eloquent.Unscoped().Table(e.TableName()).Where(" table_id in (?)", id).Delete(&SysColumns{}).Error; err != nil { - return - } - Result = true - return -} diff --git a/pkg/jsonTime/JSONTime.go b/pkg/jsonTime/JSONTime.go new file mode 100644 index 0000000..2927e7c --- /dev/null +++ b/pkg/jsonTime/JSONTime.go @@ -0,0 +1,38 @@ +/* + @Author : lanyulei +*/ + +package jsonTime + +import ( + "database/sql/driver" + "fmt" + "time" +) + +// 重写MarshalJSON实现models json返回的时间格式 +type JSONTime struct { + time.Time +} + +func (t JSONTime) MarshalJSON() ([]byte, error) { + formatted := fmt.Sprintf("\"%s\"", t.Format("2006-01-02 15:04:05")) + return []byte(formatted), nil +} + +func (t JSONTime) Value() (driver.Value, error) { + var zeroTime time.Time + if t.Time.UnixNano() == zeroTime.UnixNano() { + return nil, nil + } + return t.Time, nil +} + +func (t *JSONTime) Scan(v interface{}) error { + value, ok := v.(time.Time) + if ok { + *t = JSONTime{Time: value} + return nil + } + return fmt.Errorf("无法转换 %v 的时间格式", v) +} diff --git a/router/sys_router.go b/router/sys_router.go index 0bcbe20..71bc3f5 100644 --- a/router/sys_router.go +++ b/router/sys_router.go @@ -4,7 +4,6 @@ import ( log2 "ferry/apis/log" "ferry/apis/monitor" "ferry/apis/system" - . "ferry/apis/tools" _ "ferry/docs" "ferry/handler" "ferry/middleware" @@ -51,35 +50,7 @@ func sysNoCheckRoleRouter(r *gin.RouterGroup) { v1.GET("/monitor/server", monitor.ServerInfo) v1.GET("/getCaptcha", system.GenerateCaptchaHandler) - v1.GET("/gen/preview/:tableId", Preview) v1.GET("/menuTreeselect", system.GetMenuTreeelect) - - registerDBRouter(v1) - - registerSysTableRouter(v1) - -} - -func registerDBRouter(api *gin.RouterGroup) { - db := api.Group("/db") - { - db.GET("/tables/page", GetDBTableList) - db.GET("/columns/page", GetDBColumnList) - } -} - -func registerSysTableRouter(v1 *gin.RouterGroup) { - systables := v1.Group("/sys/tables") - { - systables.GET("/page", GetSysTableList) - tablesinfo := systables.Group("/info") - { - tablesinfo.POST("", InsertSysTable) - tablesinfo.PUT("", UpdateSysTable) - tablesinfo.DELETE("/:tableId", DeleteSysTables) - tablesinfo.GET("/:tableId", GetSysTables) - } - } } func sysCheckRoleRouterInit(r *gin.RouterGroup, authMiddleware *jwtauth.GinJWTMiddleware) { diff --git a/template/model.go.template b/template/model.go.template index b75295b..9e1c1cd 100644 --- a/template/model.go.template +++ b/template/model.go.template @@ -87,7 +87,7 @@ func (e *{{.ClassName}}) GetPage(pageSize int, pageIndex int) ([]{{.ClassName}}, if err := table.Offset((pageIndex - 1) * pageSize).Limit(pageSize).Find(&doc).Error; err != nil { return nil, 0, err } - table.Where("`deleted_at` IS NULL").Count(&count) + table.Where("`delete_time` IS NULL").Count(&count) return doc, count, nil }