From 0a2dac26ffa53737cad4c2980168eedd4c5919a3 Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期三, 27 十二月 2023 16:06:45 +0800 Subject: [PATCH] 字段修改 --- models/operation_details.go | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/models/operation_details.go b/models/operation_details.go index 9e89e77..067ba63 100644 --- a/models/operation_details.go +++ b/models/operation_details.go @@ -100,6 +100,9 @@ if slf.ProductId != "" { db = db.Where("product_id = ?", slf.ProductId) } + if slf.Preload { + db = db.Preload("Product") + } return db } -- Gitblit v1.8.0