diff --git a/business/jxstore/yonghui/yonghui.go b/business/jxstore/yonghui/yonghui.go index 512ea0244..2678934d8 100644 --- a/business/jxstore/yonghui/yonghui.go +++ b/business/jxstore/yonghui/yonghui.go @@ -165,13 +165,13 @@ func (d *DataFailedLock) AppendData2(dataFailed DataFailed) { } func LoadExcelByYongHui(ctx *jxcontext.Context, files []*multipart.FileHeader, isAsync, isContinueWhenError bool) (hint string, err error) { - if len(files) == 0 { - return "", errors.New("没有文件上传!") - } - fileHeader := files[0] - file, err := fileHeader.Open() - hint, err = LoadExcelBinByYongHui(ctx, file, true, true) - file.Close() + // if len(files) == 0 { + // return "", errors.New("没有文件上传!") + // } + // fileHeader := files[0] + // file, err := fileHeader.Open() + hint, err = LoadExcelBinByYongHui(ctx, nil, true, true) + // file.Close() return hint, err } @@ -189,7 +189,8 @@ func LoadExcelBinByYongHui(ctx *jxcontext.Context, reader io.Reader, isAsync, is switch step { case 0: //读取excel文件 - xlsx, err := excelize.OpenReader(reader) + // xlsx, err := excelize.OpenReader(reader) + xlsx, err := excelize.OpenFile("111.xlsx") if err != nil { return "", err } @@ -274,7 +275,7 @@ func LoadExcelBinByYongHui(ctx *jxcontext.Context, reader io.Reader, isAsync, is } else { costPrice = skuMap[spuCode].Price } - _, _, _ = updateWeiMobGoods(costPrice, skuMap[spuCode].Price, skuList[0].Unit, isCompare, goodsDetail) + // _, _, _ = updateWeiMobGoods(costPrice, skuMap[spuCode].Price, skuList[0].Unit, isCompare, goodsDetail) } } else { //下架微盟商品 @@ -297,7 +298,7 @@ func LoadExcelBinByYongHui(ctx *jxcontext.Context, reader io.Reader, isAsync, is for _, v := range batchItemList { int64Slice = append(int64Slice, v.(int64)) } - PutAwayWeiMobSku(int64Slice) + // PutAwayWeiMobSku(int64Slice) return retVal, err } taskParallel4 := tasksch.NewParallelTask("下架微盟商品", tasksch.NewParallelConfig().SetParallelCount(parallelCount).SetBatchSize(UpdateGoodsShelfStatusCount), ctx, taskFunc4, goodsIDListForPutAway)