|
@@ -89,6 +89,7 @@ func AgentGoodsCopy(c *gin.Context) { |
|
|
sess.Where("goods_id=?", id).Get(&goodsSku) |
|
|
sess.Where("goods_id=?", id).Get(&goodsSku) |
|
|
for k1 := range goodsSku { |
|
|
for k1 := range goodsSku { |
|
|
goodsSku[k1].SkuId = 0 |
|
|
goodsSku[k1].SkuId = 0 |
|
|
|
|
|
goodsSku[k1].GoodsId = v.Id |
|
|
goodsSku[k1].Stock = 0 |
|
|
goodsSku[k1].Stock = 0 |
|
|
} |
|
|
} |
|
|
_, err = sess.Insert(&goodsSku) |
|
|
_, err = sess.Insert(&goodsSku) |
|
|