获取平台门店商品价格

This commit is contained in:
苏尹岚
2019-12-20 11:56:53 +08:00
parent b8f7ffea18
commit fc588aec60

View File

@@ -2550,24 +2550,26 @@ func GetVendorStoreSkuPrice(ctx *jxcontext.Context, vendorIDs []int, skuID int,
}
inStoreSkuList = append(inStoreSkuList, inStoreSku)
outStoreSkuList, err := handler.GetStoreSkusBareInfo(ctx, v, task, 0, vendorStoreID, inStoreSkuList)
if err != nil {
data := DataVendorStoreSkuPrice{
StoreID: vendorStoreID,
StoreName: storeDetail.Name,
SkuID: skuID,
SkuName: skuNameList[0].Name,
VendorPrice: "",
if storeDetail != nil {
if len(outStoreSkuList) == 0 {
data := DataVendorStoreSkuPrice{
StoreID: vendorStoreID,
StoreName: storeDetail.Name,
SkuID: skuID,
SkuName: skuNameList[0].Name,
VendorPrice: "",
}
retVal = []DataVendorStoreSkuPrice{data}
} else {
data := DataVendorStoreSkuPrice{
StoreID: vendorStoreID,
StoreName: storeDetail.Name,
SkuID: skuID,
SkuName: skuNameList[0].Name,
VendorPrice: utils.Float64ToStr(utils.Str2Float64(utils.Int64ToStr(outStoreSkuList[0].VendorPrice)) / 100),
}
retVal = []DataVendorStoreSkuPrice{data}
}
retVal = []DataVendorStoreSkuPrice{data}
} else {
data := DataVendorStoreSkuPrice{
StoreID: vendorStoreID,
StoreName: storeDetail.Name,
SkuID: skuID,
SkuName: skuNameList[0].Name,
VendorPrice: utils.Float64ToStr(utils.Str2Float64(utils.Int64ToStr(outStoreSkuList[0].VendorPrice)) / 100),
}
retVal = []DataVendorStoreSkuPrice{data}
}
return retVal, err
}