From f0786e779666d67a50cd57d82cfe1e278b47d397 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期四, 04 七月 2024 11:54:11 +0800 Subject: [PATCH] fix --- models/operation.go | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/models/operation.go b/models/operation.go index 826208d..9e2846c 100644 --- a/models/operation.go +++ b/models/operation.go @@ -95,6 +95,12 @@ return &OperationSearch{Orm: mysqlx.GetDB()} } +func (slf *OperationSearch) BeforeCreate(tx *gorm.DB) { + for k := range slf.Details { + slf.Details[k].BaseOperationType = slf.BaseOperationType + } +} + func (slf *OperationSearch) SetOrm(tx *gorm.DB) *OperationSearch { slf.Orm = tx return slf -- Gitblit v1.8.0