1
This commit is contained in:
@@ -750,16 +750,7 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if storeID == 668428 {
|
|
||||||
globals.SugarLogger.Debugf("============createList : %s", utils.Format4Output(createList, false))
|
|
||||||
globals.SugarLogger.Debugf("============updateList : %s", utils.Format4Output(updateList, false))
|
|
||||||
globals.SugarLogger.Debugf("============deleteList : %s", utils.Format4Output(deleteList, false))
|
|
||||||
globals.SugarLogger.Debugf("============stockList : %s", utils.Format4Output(stockList, false))
|
|
||||||
globals.SugarLogger.Debugf("============onlineList : %s", utils.Format4Output(onlineList, false))
|
|
||||||
globals.SugarLogger.Debugf("============offlineList : %s", utils.Format4Output(offlineList, false))
|
|
||||||
globals.SugarLogger.Debugf("============priceList : %s", utils.Format4Output(priceList, false))
|
|
||||||
globals.SugarLogger.Debugf("============updateItems : %s", utils.Format4Output(updateItems, false))
|
|
||||||
}
|
|
||||||
task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError2), ctx,
|
task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError2), ctx,
|
||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
step := batchItemList[0].(int)
|
step := batchItemList[0].(int)
|
||||||
@@ -874,12 +865,13 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
|
|||||||
status = model.SkuStatusDontSale
|
status = model.SkuStatusDontSale
|
||||||
name = "不可售门店商品"
|
name = "不可售门店商品"
|
||||||
}
|
}
|
||||||
|
if storeID == 668428 {
|
||||||
|
globals.SugarLogger.Debugf("============statusList : %s", utils.Format4Output(statusList, false))
|
||||||
|
globals.SugarLogger.Debugf("============offlineList : %s", utils.Format4Output(offlineList, false))
|
||||||
|
}
|
||||||
if len(statusList) > 0 {
|
if len(statusList) > 0 {
|
||||||
_, err = putils.FreeBatchStoreSkuInfo(name, func(task tasksch.ITask, batchedStoreSkuList []*partner.StoreSkuInfo) (result interface{}, successCount int, err error) {
|
_, err = putils.FreeBatchStoreSkuInfo(name, func(task tasksch.ITask, batchedStoreSkuList []*partner.StoreSkuInfo) (result interface{}, successCount int, err error) {
|
||||||
var failedList []*partner.StoreSkuInfoWithErr
|
var failedList []*partner.StoreSkuInfoWithErr
|
||||||
if storeDetail.ID == 666900 && status == model.SkuStatusDontSale {
|
|
||||||
globals.SugarLogger.Debugf("==========status :%d,VendorOrgCode: %s ,%s, %s", status, storeDetail.VendorOrgCode, vendorStoreID, utils.Format4Output(batchedStoreSkuList, false))
|
|
||||||
}
|
|
||||||
failedList, err = storeSkuHandler.UpdateStoreSkusStatus(ctx, storeDetail.VendorOrgCode, storeID, vendorStoreID, batchedStoreSkuList, status)
|
failedList, err = storeSkuHandler.UpdateStoreSkusStatus(ctx, storeDetail.VendorOrgCode, storeID, vendorStoreID, batchedStoreSkuList, status)
|
||||||
failedList, err = buildFailedListAndErr(failedList, err, batchedStoreSkuList, nil, storeID, vendorID, "更新门店商品状态")
|
failedList, err = buildFailedListAndErr(failedList, err, batchedStoreSkuList, nil, storeID, vendorID, "更新门店商品状态")
|
||||||
if len(failedList) > 0 {
|
if len(failedList) > 0 {
|
||||||
|
|||||||
@@ -571,6 +571,7 @@ func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, v
|
|||||||
|
|
||||||
// UpdateStoreSkusStatus 批量更新商品上下架状态
|
// UpdateStoreSkusStatus 批量更新商品上下架状态
|
||||||
func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo, status int) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo, status int) (failedList []*partner.StoreSkuInfoWithErr, err error) {
|
||||||
|
globals.SugarLogger.Debugf("============vendorStoreID : %s", utils.Format4Output(vendorStoreID, false))
|
||||||
param := &request585.AlibabaWdkSkuUpdateRequest{}
|
param := &request585.AlibabaWdkSkuUpdateRequest{}
|
||||||
updateSkuList := make([]domain585.AlibabaWdkSkuUpdateSkuDo, 0, 0)
|
updateSkuList := make([]domain585.AlibabaWdkSkuUpdateSkuDo, 0, 0)
|
||||||
api := getAPI(getStoreVendorOrgCode(storeID), storeID, vendorStoreID)
|
api := getAPI(getStoreVendorOrgCode(storeID), storeID, vendorStoreID)
|
||||||
@@ -588,6 +589,7 @@ func (p *PurchaseHandler) UpdateStoreSkusStatus(ctx *jxcontext.Context, vendorOr
|
|||||||
}
|
}
|
||||||
|
|
||||||
param.ParamList = &updateSkuList
|
param.ParamList = &updateSkuList
|
||||||
|
globals.SugarLogger.Debugf("============vendorStoreID param: %s", utils.Format4Output(param, false))
|
||||||
result, err := api.UpdateStoreSku(param)
|
result, err := api.UpdateStoreSku(param)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
globals.SugarLogger.Debugf("UpdateStoreSku Tao Vegetable err : %s", err.Error())
|
globals.SugarLogger.Debugf("UpdateStoreSku Tao Vegetable err : %s", err.Error())
|
||||||
|
|||||||
Reference in New Issue
Block a user