1
This commit is contained in:
@@ -190,8 +190,6 @@ func (c *OrderManager) OnOrderStatusChanged(vendorOrgCode string, orderStatus *m
|
||||
}
|
||||
|
||||
isDuplicated, order, err := c.addOrderStatus(orderStatus, db)
|
||||
globals.SugarLogger.Debugf("==========isDuplicated := %s", utils.Format4Output(isDuplicated, false))
|
||||
globals.SugarLogger.Debugf("==========orderStatus := %s", utils.Format4Output(orderStatus, false))
|
||||
if err == nil {
|
||||
dao.Commit(db, txDB)
|
||||
if orderStatus.Status == model.OrderStatusWaybillTipChanged {
|
||||
|
||||
@@ -46,10 +46,10 @@ func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromVendorStoreId, toStoreId
|
||||
switch step {
|
||||
case 1:
|
||||
// 1.加载门店商品,删除商品.当分类下没有商品时.删除分类
|
||||
//errs := LoadingStoreSkuList(ctx, toApi, toStore.VendorStoreID)
|
||||
//if errs != nil && len(errs) > 0 {
|
||||
// return nil, errs[0]
|
||||
//}
|
||||
errs := LoadingStoreSkuList(ctx, toApi, toStore.VendorStoreID)
|
||||
if errs != nil && len(errs) > 0 {
|
||||
return nil, errs[0]
|
||||
}
|
||||
case 2:
|
||||
// 同步分类
|
||||
//fromCategoryList, err := fromApi.RetailCatList(utils.Int2Str(fromVendorStoreId))
|
||||
@@ -80,22 +80,22 @@ func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromVendorStoreId, toStoreId
|
||||
//}
|
||||
|
||||
case 3:
|
||||
i := offSet
|
||||
for {
|
||||
// 同步商品
|
||||
fromFoodList, err1 := fromApi.RetailListAll(utils.Int2Str(fromVendorStoreId), i)
|
||||
if len(fromFoodList) == 0 || fromFoodList == nil {
|
||||
return nil, fmt.Errorf("fromFoodList 为空 %s ,i:= %d", utils.Format4Output(err1, false), i)
|
||||
}
|
||||
|
||||
if err := BatchInitData(ctx, fromFoodList, toApi, toStore.VendorStoreID, i); err != nil {
|
||||
globals.SugarLogger.Debugf("BatchInitData : %s", utils.Format4Output(err, false))
|
||||
}
|
||||
if len(fromFoodList) < 100 {
|
||||
break
|
||||
}
|
||||
i++
|
||||
}
|
||||
//i := offSet
|
||||
//for {
|
||||
// // 同步商品
|
||||
// fromFoodList, err1 := fromApi.RetailListAll(utils.Int2Str(fromVendorStoreId), i)
|
||||
// if len(fromFoodList) == 0 || fromFoodList == nil {
|
||||
// return nil, fmt.Errorf("fromFoodList 为空 %s ,i:= %d", utils.Format4Output(err1, false), i)
|
||||
// }
|
||||
//
|
||||
// if err := BatchInitData(ctx, fromFoodList, toApi, toStore.VendorStoreID, i); err != nil {
|
||||
// globals.SugarLogger.Debugf("BatchInitData : %s", utils.Format4Output(err, false))
|
||||
// }
|
||||
// if len(fromFoodList) < 100 {
|
||||
// break
|
||||
// }
|
||||
// i++
|
||||
//}
|
||||
|
||||
}
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user