From 777ef212c8a0d7b325e7cb8c72a6fb6eb7ded605 Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Fri, 10 Jul 2020 00:31:55 +0800 Subject: [PATCH 1/7] fix: fix User management Invalid search box search --- apis/system/sysuser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/system/sysuser.go b/apis/system/sysuser.go index e11c271a..c564abff 100644 --- a/apis/system/sysuser.go +++ b/apis/system/sysuser.go @@ -34,7 +34,7 @@ func GetSysUserList(c *gin.Context) { pageIndex = tools.StrToInt(err, index) } - data.Username = c.Request.FormValue("userName") + data.Username = c.Request.FormValue("username") data.Status = c.Request.FormValue("status") data.Phone = c.Request.FormValue("phone") From 82b78a728c870717924c9580be5d0dd9e54a83f1 Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Fri, 10 Jul 2020 00:33:10 +0800 Subject: [PATCH 2/7] fix: fix User management Invalid search box search (#149) --- apis/system/sysuser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/system/sysuser.go b/apis/system/sysuser.go index c564abff..e11c271a 100644 --- a/apis/system/sysuser.go +++ b/apis/system/sysuser.go @@ -34,7 +34,7 @@ func GetSysUserList(c *gin.Context) { pageIndex = tools.StrToInt(err, index) } - data.Username = c.Request.FormValue("username") + data.Username = c.Request.FormValue("userName") data.Status = c.Request.FormValue("status") data.Phone = c.Request.FormValue("phone") From 4f7e22a6f2e0efd938e24d595d5a989cb7fe1d6c Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Fri, 10 Jul 2020 00:42:34 +0800 Subject: [PATCH 3/7] fix: fix User management Invalid search box search (#149) --- apis/system/sysuser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/system/sysuser.go b/apis/system/sysuser.go index e11c271a..c564abff 100644 --- a/apis/system/sysuser.go +++ b/apis/system/sysuser.go @@ -34,7 +34,7 @@ func GetSysUserList(c *gin.Context) { pageIndex = tools.StrToInt(err, index) } - data.Username = c.Request.FormValue("userName") + data.Username = c.Request.FormValue("username") data.Status = c.Request.FormValue("status") data.Phone = c.Request.FormValue("phone") From 2195c7a9443b2037375ca4413d93f4c6aab62068 Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Sat, 11 Jul 2020 06:29:07 +0800 Subject: [PATCH 4/7] fix:Invalid post search criteria --- apis/system/post.go | 19 +++++++++++-------- models/post.go | 3 +++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/apis/system/post.go b/apis/system/post.go index 20350f33..204a5080 100644 --- a/apis/system/post.go +++ b/apis/system/post.go @@ -10,9 +10,10 @@ import ( // @Summary 职位列表数据 // @Description 获取JSON // @Tags 职位 -// @Param name query string false "name" -// @Param id query string false "id" -// @Param position query string false "position" +// @Param postName query string false "postName" +// @Param postCode query string false "postCode" +// @Param postId query string false "postId" +// @Param status query string false "status" // @Success 200 {object} app.Response "{"code": 200, "data": [...]}" // @Router /api/v1/post [get] // @Security @@ -30,11 +31,13 @@ func GetPostList(c *gin.Context) { pageIndex = tools.StrToInt(err, index) } - data.PostName = c.Request.FormValue("postName") id := c.Request.FormValue("postId") data.PostId, _ = tools.StringToInt(id) + data.PostCode = c.Request.FormValue("postCode") data.PostName = c.Request.FormValue("postName") + data.Status = c.Request.FormValue("status") + data.DataScope = tools.GetUserIdStr(c) result, count, err := data.GetPage(pageSize, pageIndex) tools.HasError(err, "", -1) @@ -53,7 +56,7 @@ func GetPost(c *gin.Context) { Post.PostId, _ = tools.StringToInt(c.Param("postId")) result, err := Post.Get() tools.HasError(err, "抱歉未找到相关信息", -1) - app.OK(c,result,"") + app.OK(c, result, "") } // @Summary 添加职位 @@ -73,7 +76,7 @@ func InsertPost(c *gin.Context) { tools.HasError(err, "", 500) result, err := data.Create() tools.HasError(err, "", -1) - app.OK(c,result,"") + app.OK(c, result, "") } // @Summary 修改职位 @@ -94,7 +97,7 @@ func UpdatePost(c *gin.Context) { tools.HasError(err, "", -1) result, err := data.Update(data.PostId) tools.HasError(err, "", -1) - app.OK(c,result,"修改成功") + app.OK(c, result, "修改成功") } // @Summary 删除职位 @@ -110,5 +113,5 @@ func DeletePost(c *gin.Context) { IDS := tools.IdsStrToIdsIntGroup("postId", c) result, err := data.BatchDelete(IDS) tools.HasError(err, "删除失败", 500) - app.OK(c,result,"删除成功") + app.OK(c, result, "删除成功") } diff --git a/models/post.go b/models/post.go index c6226fac..97213bc5 100644 --- a/models/post.go +++ b/models/post.go @@ -90,6 +90,9 @@ func (e *Post) GetPage(pageSize int, pageIndex int) ([]Post, int, error) { if e.PostName != "" { table = table.Where("post_name = ?", e.PostName) } + if e.PostCode != "" { + table = table.Where("post_code = ?", e.PostCode) + } if e.Status != "" { table = table.Where("status = ?", e.Status) } From aa75242c1ad2e6d1898b47ee9c6b6b405b0d0a69 Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Sun, 12 Jul 2020 09:19:52 +0800 Subject: [PATCH 5/7] =?UTF-8?q?doc=EF=BC=9Aupdate=20readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a4555a15..fe769c9d 100644 --- a/README.md +++ b/README.md @@ -86,12 +86,24 @@ [使用生成工具轻松实现业务](https://www.bilibili.com/video/BV1Dg4y1i79D) -[go-admin菜单的配置说明](https://www.bilibili.com/video/BV1Wp4y1D715) - [多命令启动方式讲解以及IDE配置](https://www.bilibili.com/video/BV1Fg4y1q7ph) +[go-admin菜单的配置说明](https://www.bilibili.com/video/BV1Wp4y1D715) [必看] + +[如何配置菜单信息以及接口信息](https://www.bilibili.com/video/BV1zv411B7nG) [必看] + +[go-admin权限配置使用说明](https://www.bilibili.com/video/BV1rt4y197d3) [必看] + +[go-admin数据权限使用说明](https://www.bilibili.com/video/BV1LK4y1s71e) [必看] + **如有问题请先看上述使用文档和文章,若不能满足,欢迎 issue 和 pr ,视频教程和文档持续更新中** +## 🗞 系统架构 + +

+ +

+ ## 📦 本地开发 ### 首次启动说明 From 451f6f9e78c62ffc886bc3eff9e71b5817965ddb Mon Sep 17 00:00:00 2001 From: wenjianzhang Date: Sun, 12 Jul 2020 09:49:55 +0800 Subject: [PATCH 6/7] doc:update readme img hight --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fe769c9d..4407222e 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ ## 🗞 系统架构

- +

## 📦 本地开发 From 62a05daa5a7d9fa41f38e377e054dc57959d8114 Mon Sep 17 00:00:00 2001 From: wenjianzhang Date: Fri, 17 Jul 2020 19:02:01 +0800 Subject: [PATCH 7/7] fix:template list not define --- template/vue.go.template | 1 + 1 file changed, 1 insertion(+) diff --git a/template/vue.go.template b/template/vue.go.template index e020a030..a44989f9 100644 --- a/template/vue.go.template +++ b/template/vue.go.template @@ -172,6 +172,7 @@ isEdit: false, // 类型数据字典 typeOptions: [], + {{.ModuleName}}List:[], {{range .Columns}} {{- if ne .DictType "" -}} {{.JsonField}}Options: [],