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{