获取门店商品价格

This commit is contained in:
苏尹岚
2019-12-20 11:40:04 +08:00
parent d6d4ab23bb
commit b8f7ffea18
2 changed files with 18 additions and 23 deletions

View File

@@ -2551,28 +2551,23 @@ 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 {
return retVal, err
}
if storeDetail != nil {
if len(outStoreSkuList) > 0 {
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}
} else {
data := DataVendorStoreSkuPrice{
StoreID: vendorStoreID,
StoreName: storeDetail.Name,
SkuID: skuID,
SkuName: skuNameList[0].Name,
VendorPrice: "",
}
retVal = []DataVendorStoreSkuPrice{data}
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}
}
return retVal, err
}