处理重复数据

master
kanade 3 years ago
parent b572104522
commit fe4aa69e38

@ -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

Loading…
Cancel
Save