|
@@ -226,21 +226,20 @@ func (s SyncOrderService) copyOrderBestshopToOrderBase(orderBestshop *domain.Ord |
|
@@ -226,21 +226,20 @@ func (s SyncOrderService) copyOrderBestshopToOrderBase(orderBestshop *domain.Ord |
226
|
good := domain.NewOrderGood()
|
226
|
good := domain.NewOrderGood()
|
227
|
orderBestshop.Goods[i].CopyToOrderGood(&good)
|
227
|
orderBestshop.Goods[i].CopyToOrderGood(&good)
|
228
|
good.OrderId = orderbase.Id
|
228
|
good.OrderId = orderbase.Id
|
|
|
229
|
+ good.CompanyId = partnerData.CompanyId
|
229
|
good.Compute()
|
230
|
good.Compute()
|
230
|
good.CurrentBonusStatus.WartPayPartnerBonus(&good)
|
231
|
good.CurrentBonusStatus.WartPayPartnerBonus(&good)
|
231
|
ordergoods = append(ordergoods, good)
|
232
|
ordergoods = append(ordergoods, good)
|
232
|
}
|
233
|
}
|
233
|
orderbase.Goods = ordergoods
|
234
|
orderbase.Goods = ordergoods
|
234
|
orderbase.PartnerId = orderBestshop.PartnerId
|
235
|
orderbase.PartnerId = orderBestshop.PartnerId
|
|
|
236
|
+ orderbase.CompanyId = partnerData.CompanyId
|
235
|
orderbase.Compute()
|
237
|
orderbase.Compute()
|
236
|
err = orderBaseRepository.Save(&orderbase)
|
238
|
err = orderBaseRepository.Save(&orderbase)
|
237
|
if err != nil {
|
239
|
if err != nil {
|
238
|
e := fmt.Sprintf("添加order_base数据失败%s", err)
|
240
|
e := fmt.Sprintf("添加order_base数据失败%s", err)
|
239
|
return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, e)
|
241
|
return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, e)
|
240
|
}
|
242
|
}
|
241
|
- for i := range ordergoods {
|
|
|
242
|
- ordergoods[i].OrderId = orderbase.Id
|
|
|
243
|
- }
|
|
|
244
|
// 添加goods
|
243
|
// 添加goods
|
245
|
err = orderGoodRepository.Save(ordergoods)
|
244
|
err = orderGoodRepository.Save(ordergoods)
|
246
|
if err != nil {
|
245
|
if err != nil {
|