From cbdfa61268d68d0a8c2f5293ff11d74ca21b8cc0 Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Sat, 22 May 2021 23:24:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/actions/permission.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/actions/permission.go b/common/actions/permission.go index 1c6f82ebc..357f0a532 100644 --- a/common/actions/permission.go +++ b/common/actions/permission.go @@ -71,7 +71,7 @@ func Permission(tableName string, p *DataPermission) func(db *gorm.DB) *gorm.DB case "3": return db.Where(tableName+".create_by in (SELECT user_id from sys_user where dept_id = ? )", p.DeptId) case "4": - return db.Where(tableName+".create_by in (SELECT user_id from sys_user where sys_user.dept_id in(select dept_id from sys_dept where dept_path like ? ))", "%"+pkg.IntToString(p.DeptId)+"%") + return db.Where(tableName+".create_by in (SELECT user_id from sys_user where sys_user.dept_id in(select dept_id from sys_dept where dept_path like ? ))", "%/"+pkg.IntToString(p.DeptId)+"/%") case "5": return db.Where(tableName+".create_by = ?", p.UserId) default: From 1b2bf70df13835d607ad2977b4320db59526cf1b Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Sat, 22 May 2021 23:25:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?docs=F0=9F=93=9D=20=E4=BF=AE=E6=94=B9readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d63160ea0..289b3ffe9 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,11 @@ 系统初始化极度简单,只需要配置文件中,修改数据库连接,系统启动后会自动初始化数据库信息以及必须的基础数据 -[在线文档国际](https://wenjianzhang.github.io/go-admin-site) +[在线文档](https://doc.go-admin.dev) -[在线文档国内](http://mydearzwj.gitee.io/go-admin-site/) +[github在线文档](https://wenjianzhang.github.io) + +[gitee在线文档](http://mydearzwj.gitee.io/go-admin-doc/) [前端项目](https://github.com/go-admin-team/go-admin-ui)