From 2a97e4852391d427c4780ff8e22de7430b3db147 Mon Sep 17 00:00:00 2001 From: what Date: Thu, 20 Jul 2023 15:42:40 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20g=20=E5=8F=82=E6=95=B0=E6=9C=AA?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/engine.go | 2 +- engine/engine_param.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/engine.go b/engine/engine.go index da1299b..8aa33f1 100644 --- a/engine/engine.go +++ b/engine/engine.go @@ -204,5 +204,5 @@ func (this *Engine[T]) Execute(data T) error { } func New[T any](table string, relations ...string) *Engine[T] { - return &Engine[T]{code: table, relations: relations} + return &Engine[T]{code: table, relations: relations, g: support.NewGlobalParam("", nil)} } diff --git a/engine/engine_param.go b/engine/engine_param.go index e0c078b..8b174a6 100644 --- a/engine/engine_param.go +++ b/engine/engine_param.go @@ -11,5 +11,5 @@ func (this EngineParam) GetParam(k string) contracts.GlobalParams { } func (this EngineParam) GetGlobalParamsUser() contracts.User { - return nil + return this.data.User() }