From 9d3cea8669068ed7bdce725171fa519c2dc9285f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AD=90=E9=93=AD?= Date: Fri, 21 Mar 2025 18:25:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/data/repoimpl/order.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/data/repoimpl/order.go b/internal/data/repoimpl/order.go index 14fea1a..96223a6 100644 --- a/internal/data/repoimpl/order.go +++ b/internal/data/repoimpl/order.go @@ -81,6 +81,7 @@ func (p *OrderRepoImpl) Create(ctx context.Context, req *bo.OrderBo) (*bo.OrderB } tx := p.DB(ctx).Create(info) + if tx.Error != nil { return nil, fmt.Errorf("create db fail %w", tx.Error) }