|
|
@ -330,7 +330,7 @@ func (s *supplyLogic) Adopt(data AdoptSkuInfo) error {
|
|
|
|
if tx.Model(&manage.RecookThirdPartySupply{}).Where("id = ?", thirdPartySupply.Id).Updates(map[string]interface{}{
|
|
|
|
if tx.Model(&manage.RecookThirdPartySupply{}).Where("id = ?", thirdPartySupply.Id).Updates(map[string]interface{}{
|
|
|
|
"status": manage.RecookThirdPartySupplyStatusAdopt,
|
|
|
|
"status": manage.RecookThirdPartySupplyStatusAdopt,
|
|
|
|
"goods_id": recookGoodsSkuModels[0].GoodsId,
|
|
|
|
"goods_id": recookGoodsSkuModels[0].GoodsId,
|
|
|
|
}).Error != nil {
|
|
|
|
}).RowsAffected != 1 {
|
|
|
|
return errors.New("入库失败")
|
|
|
|
return errors.New("入库失败")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
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{}{
|
|
|
|
if tx.Model(&manage.RecookThirdPartySupply{}).Where("id = ?", thirdPartySupply.Id).Updates(map[string]interface{}{
|
|
|
|
"status": manage.RecookThirdPartySupplyStatusAdopt,
|
|
|
|
"status": manage.RecookThirdPartySupplyStatusAdopt,
|
|
|
|
"goods_id": recookGoodsInfoModel.Id,
|
|
|
|
"goods_id": recookGoodsInfoModel.Id,
|
|
|
|
}).Error != nil {
|
|
|
|
}).RowsAffected != 1 {
|
|
|
|
return errors.New("入库失败")
|
|
|
|
return errors.New("入库失败")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|