获取各平台商品门店价格

This commit is contained in:
苏尹岚
2019-12-20 16:58:19 +08:00
parent da97aee570
commit ce4703b720

View File

@@ -2528,9 +2528,10 @@ func GetVendorStoreSkuPrice(ctx *jxcontext.Context, vendorIDs []int, skuID int,
taskFunc := func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
vendorStoreID := batchItemList[0].(string)
var (
inStoreSkuList []*partner.StoreSkuInfo
storeDetail *dao.StoreDetail
inStoreSku = &partner.StoreSkuInfo{}
inStoreSkuList []*partner.StoreSkuInfo
storeDetail *dao.StoreDetail
inStoreSku = &partner.StoreSkuInfo{}
outStoreSkuList []*partner.StoreSkuInfo
)
db := dao.GetDB()
skuNameList, err := dao.GetSkus(db, []int{skuID}, nil, nil, nil)
@@ -2548,8 +2549,13 @@ func GetVendorStoreSkuPrice(ctx *jxcontext.Context, vendorIDs []int, skuID int,
storeDetail, err = singleHandler.ReadStore(ctx, v, vendorStoreID)
inStoreSku.SkuID = skuID
}
storeDetail2, err := dao.GetStoreDetail2(db, 0, vendorStoreID, vendorID)
if storeDetail2 != nil {
outStoreSkuList, err = handler.GetStoreSkusBareInfo(ctx, v, task, storeDetail2.ID, vendorStoreID, inStoreSkuList)
} else {
outStoreSkuList, err = handler.GetStoreSkusBareInfo(ctx, v, task, 0, vendorStoreID, inStoreSkuList)
}
inStoreSkuList = append(inStoreSkuList, inStoreSku)
outStoreSkuList, err := handler.GetStoreSkusBareInfo(ctx, v, task, 0, vendorStoreID, inStoreSkuList)
if storeDetail != nil {
if len(outStoreSkuList) == 0 {
data := DataVendorStoreSkuPrice{