From 1f36e62727388de4de0d1069d7762bd1bfd6d239 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Fri, 18 Aug 2023 12:18:56 +0800 Subject: [PATCH] fix --- model/gmodel/fs_product_template_v2_logic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/gmodel/fs_product_template_v2_logic.go b/model/gmodel/fs_product_template_v2_logic.go index cfae7d32..d5364778 100755 --- a/model/gmodel/fs_product_template_v2_logic.go +++ b/model/gmodel/fs_product_template_v2_logic.go @@ -41,7 +41,7 @@ func (t *FsProductTemplateV2Model) FindAllByIdsWithoutStatus(ctx context.Context } func (t *FsProductTemplateV2Model) FindOne(ctx context.Context, id int64) (resp *FsProductTemplateV2, err error) { - err = t.db.WithContext(ctx).Model(&FsProductTemplateV2{}).Where("`id` = ? ", id).Find(&resp).Error + err = t.db.WithContext(ctx).Model(&FsProductTemplateV2{}).Where("`id` = ? ", id).Take(&resp).Error return resp, err } func (t *FsProductTemplateV2Model) FindByParam(ctx context.Context, id int64, modelId int64, fields ...string) (resp *FsProductTemplateV2, err error) {