From 67ce97958645b6a68d19642722553bff71c238b7 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 21 Nov 2024 14:03:52 +0800 Subject: [PATCH] 1 --- app/agent/svc/svc_goods.go | 2 ++ app/store/svc/svc_goods.go | 1 + 2 files changed, 3 insertions(+) diff --git a/app/agent/svc/svc_goods.go b/app/agent/svc/svc_goods.go index 69e15a1..cc43ca9 100644 --- a/app/agent/svc/svc_goods.go +++ b/app/agent/svc/svc_goods.go @@ -252,6 +252,8 @@ func GoodsSave(c *gin.Context) { return } } + sess.Where("goods_id=?", goods.Id).Delete(&model.CommunityTeamSku{}) + skuModelList := make([]*model.CommunityTeamSku, 0, len(args.SkuList)) for _, item := range args.SkuList { skuModelList = append(skuModelList, &model.CommunityTeamSku{ diff --git a/app/store/svc/svc_goods.go b/app/store/svc/svc_goods.go index 1ca8eec..068197d 100644 --- a/app/store/svc/svc_goods.go +++ b/app/store/svc/svc_goods.go @@ -252,6 +252,7 @@ func GoodsSave(c *gin.Context) { return } } + sess.Where("goods_id=?", goods.Id).Delete(&model.CommunityTeamSku{}) skuModelList := make([]*model.CommunityTeamSku, 0, len(args.SkuList)) for _, item := range args.SkuList { skuModelList = append(skuModelList, &model.CommunityTeamSku{