From fe4aa69e384a103af1759971facfdfb5427a9631 Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 24 Nov 2022 11:19:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E9=87=8D=E5=A4=8D=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/v2/logic/third/supply.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/v2/logic/third/supply.go b/internal/v2/logic/third/supply.go index e9aa62c..22a8533 100644 --- a/internal/v2/logic/third/supply.go +++ b/internal/v2/logic/third/supply.go @@ -330,7 +330,7 @@ func (s *supplyLogic) Adopt(data AdoptSkuInfo) error { if tx.Model(&manage.RecookThirdPartySupply{}).Where("id = ?", thirdPartySupply.Id).Updates(map[string]interface{}{ "status": manage.RecookThirdPartySupplyStatusAdopt, "goods_id": recookGoodsSkuModels[0].GoodsId, - }).Error != nil { + }).RowsAffected != 1 { return errors.New("入库失败") } return nil @@ -468,7 +468,7 @@ func (s *supplyLogic) Adopt(data AdoptSkuInfo) error { if tx.Model(&manage.RecookThirdPartySupply{}).Where("id = ?", thirdPartySupply.Id).Updates(map[string]interface{}{ "status": manage.RecookThirdPartySupplyStatusAdopt, "goods_id": recookGoodsInfoModel.Id, - }).Error != nil { + }).RowsAffected != 1 { return errors.New("入库失败") } return nil