[fix] g 参数未初始化错误

This commit is contained in:
what 2023-07-20 15:42:40 +08:00
parent b481cfe969
commit 2a97e48523
2 changed files with 2 additions and 2 deletions

View File

@ -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)}
}

View File

@ -11,5 +11,5 @@ func (this EngineParam) GetParam(k string) contracts.GlobalParams {
}
func (this EngineParam) GetGlobalParamsUser() contracts.User {
return nil
return this.data.User()
}