...
|
...
|
@@ -226,21 +226,20 @@ func (s SyncOrderService) copyOrderBestshopToOrderBase(orderBestshop *domain.Ord |
|
|
good := domain.NewOrderGood()
|
|
|
orderBestshop.Goods[i].CopyToOrderGood(&good)
|
|
|
good.OrderId = orderbase.Id
|
|
|
good.CompanyId = partnerData.CompanyId
|
|
|
good.Compute()
|
|
|
good.CurrentBonusStatus.WartPayPartnerBonus(&good)
|
|
|
ordergoods = append(ordergoods, good)
|
|
|
}
|
|
|
orderbase.Goods = ordergoods
|
|
|
orderbase.PartnerId = orderBestshop.PartnerId
|
|
|
orderbase.CompanyId = partnerData.CompanyId
|
|
|
orderbase.Compute()
|
|
|
err = orderBaseRepository.Save(&orderbase)
|
|
|
if err != nil {
|
|
|
e := fmt.Sprintf("添加order_base数据失败%s", err)
|
|
|
return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, e)
|
|
|
}
|
|
|
for i := range ordergoods {
|
|
|
ordergoods[i].OrderId = orderbase.Id
|
|
|
}
|
|
|
// 添加goods
|
|
|
err = orderGoodRepository.Save(ordergoods)
|
|
|
if err != nil {
|
...
|
...
|
|