标品查询存到库里
This commit is contained in:
@@ -11,6 +11,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/aliupcapi"
|
||||
|
||||
"git.rosy.net.cn/baseapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/ebaiapi"
|
||||
@@ -1882,7 +1884,14 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader, categoryID
|
||||
return retVal, err
|
||||
}
|
||||
if len(productInfos) == 0 {
|
||||
result, _ := api.AliUpcAPI.GetAliUpcInfo(*v.Upc)
|
||||
var result *aliupcapi.GetAliUpcInfoResult
|
||||
upcDepot, err := dao.GetUpcDepot(db, *v.Upc)
|
||||
if upcDepot == nil {
|
||||
result, _ = api.AliUpcAPI.GetAliUpcInfo(*v.Upc)
|
||||
err = dao.InsertUpcDepot(db, result)
|
||||
} else {
|
||||
result = upcDepot
|
||||
}
|
||||
if result == nil {
|
||||
retVal = []*CreateUpcSkuByExcelErr{buildCreateUpcSkuByExcelErr(v, "未在标品库查到此商品,请手动创建!")}
|
||||
return retVal, err
|
||||
|
||||
Reference in New Issue
Block a user