1
This commit is contained in:
@@ -189,6 +189,11 @@ func CopyMtToMT(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, isA
|
||||
if len(fromCategoryList) == model.NO {
|
||||
return nil, err
|
||||
}
|
||||
toCategoryList, err := toApi.RetailCatList(fromStore.VendorStoreID)
|
||||
if len(toCategoryList) == model.NO {
|
||||
return nil, err
|
||||
}
|
||||
if len(fromCategoryList) != len(toCategoryList) {
|
||||
for _, v := range fromCategoryList {
|
||||
categoryErr := toApi.RetailCatUpdate(toStore.VendorStoreID, v.Name, &mtwmapi.Param4UpdateCat{
|
||||
CategoryCode: v.Code,
|
||||
@@ -210,7 +215,7 @@ func CopyMtToMT(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, isA
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
case 3:
|
||||
i := offSet
|
||||
for {
|
||||
@@ -227,6 +232,7 @@ func CopyMtToMT(ctx *jxcontext.Context, fromStore, toStore *dao.StoreDetail, isA
|
||||
break
|
||||
}
|
||||
i++
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user