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()