读取永辉excel

This commit is contained in:
苏尹岚
2019-11-18 17:14:07 +08:00
parent 74dfe66326
commit bfb3aa5b0e

View File

@@ -151,7 +151,7 @@ func LoadExcelBinByYongHui(ctx *jxcontext.Context, reader io.Reader, isAsync, Is
for k, _ := range skuMap {
//表示excel上有微盟上没有
if goodsInfoAndDetailMap[k] == nil {
errMsg += fmt.Sprintf("在微盟上未找到该商品excel商品ID : [%v]\n", k)
errMsg += fmt.Sprintf("在微盟上未找到该商品excel商品ID : [%v]", k)
}
}
// if errMsg != "" {
@@ -170,7 +170,7 @@ func LoadExcelBinByYongHui(ctx *jxcontext.Context, reader io.Reader, isAsync, Is
//获取京西库商品
skuList, _ := dao.GetSkus(db, nil, []int{int(utils.Str2Int64(goodsDetail.SkuMap.SingleSku.OuterSkuCode))}, nil, nil)
if len(skuList) == 0 {
errTmp += fmt.Sprintf("在京西库中未找到该商品name_id : [%v] \n", goodsDetail.SkuMap.SingleSku.OuterSkuCode)
errTmp += fmt.Sprintf("在京西库中未找到该商品name_id : [%v]", goodsDetail.SkuMap.SingleSku.OuterSkuCode)
} else {
if skuList[0].Unit == "份" {
if goodsDetail.SkuMap.SingleSku.B2CSku.Weight == 0 {
@@ -191,7 +191,7 @@ func LoadExcelBinByYongHui(ctx *jxcontext.Context, reader io.Reader, isAsync, Is
}
}
if err == nil {
return retVal, errors.New(errTmp)
return retVal, errors.New(errMsg + errTmp)
}
return retVal, err
}