This commit is contained in:
邹宗楠
2023-10-25 14:26:48 +08:00
parent b8cd872938
commit a91b313b48
2 changed files with 20 additions and 22 deletions

View File

@@ -190,8 +190,6 @@ func (c *OrderManager) OnOrderStatusChanged(vendorOrgCode string, orderStatus *m
} }
isDuplicated, order, err := c.addOrderStatus(orderStatus, db) 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 { if err == nil {
dao.Commit(db, txDB) dao.Commit(db, txDB)
if orderStatus.Status == model.OrderStatusWaybillTipChanged { if orderStatus.Status == model.OrderStatusWaybillTipChanged {

View File

@@ -46,10 +46,10 @@ func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromVendorStoreId, toStoreId
switch step { switch step {
case 1: case 1:
// 1.加载门店商品,删除商品.当分类下没有商品时.删除分类 // 1.加载门店商品,删除商品.当分类下没有商品时.删除分类
//errs := LoadingStoreSkuList(ctx, toApi, toStore.VendorStoreID) errs := LoadingStoreSkuList(ctx, toApi, toStore.VendorStoreID)
//if errs != nil && len(errs) > 0 { if errs != nil && len(errs) > 0 {
// return nil, errs[0] return nil, errs[0]
//} }
case 2: case 2:
// 同步分类 // 同步分类
//fromCategoryList, err := fromApi.RetailCatList(utils.Int2Str(fromVendorStoreId)) //fromCategoryList, err := fromApi.RetailCatList(utils.Int2Str(fromVendorStoreId))
@@ -80,22 +80,22 @@ func CopyOnStoreSkuToOther(ctx *jxcontext.Context, fromVendorStoreId, toStoreId
//} //}
case 3: case 3:
i := offSet //i := offSet
for { //for {
// 同步商品 // // 同步商品
fromFoodList, err1 := fromApi.RetailListAll(utils.Int2Str(fromVendorStoreId), i) // fromFoodList, err1 := fromApi.RetailListAll(utils.Int2Str(fromVendorStoreId), i)
if len(fromFoodList) == 0 || fromFoodList == nil { // if len(fromFoodList) == 0 || fromFoodList == nil {
return nil, fmt.Errorf("fromFoodList 为空 %s ,i:= %d", utils.Format4Output(err1, false), i) // return nil, fmt.Errorf("fromFoodList 为空 %s ,i:= %d", utils.Format4Output(err1, false), i)
} // }
//
if err := BatchInitData(ctx, fromFoodList, toApi, toStore.VendorStoreID, i); err != nil { // if err := BatchInitData(ctx, fromFoodList, toApi, toStore.VendorStoreID, i); err != nil {
globals.SugarLogger.Debugf("BatchInitData : %s", utils.Format4Output(err, false)) // globals.SugarLogger.Debugf("BatchInitData : %s", utils.Format4Output(err, false))
} // }
if len(fromFoodList) < 100 { // if len(fromFoodList) < 100 {
break // break
} // }
i++ // i++
} //}
} }
return return