From c14d3946c35666fe9277bb422331fb2ac132a3a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=B5=B7?= <10402852@qq.com> Date: Tue, 5 Jan 2021 11:27:59 +0800 Subject: [PATCH] 'commit' --- dsBaseRpc/RpcService/BaseRole/BaseRoleDao/BaseRoleDao.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dsBaseRpc/RpcService/BaseRole/BaseRoleDao/BaseRoleDao.go b/dsBaseRpc/RpcService/BaseRole/BaseRoleDao/BaseRoleDao.go index 48931560..5ce3d360 100644 --- a/dsBaseRpc/RpcService/BaseRole/BaseRoleDao/BaseRoleDao.go +++ b/dsBaseRpc/RpcService/BaseRole/BaseRoleDao/BaseRoleDao.go @@ -55,7 +55,8 @@ func PageBaseRole(in *BaseRoleProto.QueryArg) ([]map[string]interface{}, int32, var offset = int((in.Page - 1) * in.Limit) var myBuilder = builder.Dialect(builder.MYSQL).Select("t1.*").From("t_base_role as t1") - myBuilder.And(builder.Eq{"t1.app_id": in.AppId}) + myBuilder.InnerJoin("t_base_role_app as t2", "t1.role_id=t2.role_id") + myBuilder.And(builder.Eq{"t2.app_id": in.AppId}) myBuilder.And(builder.Eq{"t1.identity_id": in.IdentityId}) //获取拼接完成的SQL语句 sql, err := myBuilder.OrderBy("t1.sort_id").Limit(limit, offset).ToBoundSQL()