根据微盟更新京西价修改
This commit is contained in:
@@ -771,6 +771,7 @@ func UpdateJxPriceByWeimob(ctx *jxcontext.Context, storeIDs []int, isAsync, isCo
|
|||||||
var (
|
var (
|
||||||
storeSkuBindInfoList []interface{}
|
storeSkuBindInfoList []interface{}
|
||||||
skuBindInfos []*cms.StoreSkuBindInfo
|
skuBindInfos []*cms.StoreSkuBindInfo
|
||||||
|
nameID int
|
||||||
)
|
)
|
||||||
db := dao.GetDB()
|
db := dao.GetDB()
|
||||||
dataFailed.dataFailedList = dataFailed.dataFailedList[0:0]
|
dataFailed.dataFailedList = dataFailed.dataFailedList[0:0]
|
||||||
@@ -793,9 +794,19 @@ func UpdateJxPriceByWeimob(ctx *jxcontext.Context, storeIDs []int, isAsync, isCo
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
baseapi.SugarLogger.Errorf("QueryGoodsDetail error:%v", err)
|
baseapi.SugarLogger.Errorf("QueryGoodsDetail error:%v", err)
|
||||||
}
|
}
|
||||||
nameID := int(utils.Str2Int64(goodsDetail.SkuMap.SingleSku.OuterSkuCode))
|
|
||||||
unitPrice := int(utils.Float64TwoInt64(goodsDetail.SkuMap.SingleSku.CostPrice * 100))
|
|
||||||
goodsID := goodsDetail.OuterGoodsCode
|
goodsID := goodsDetail.OuterGoodsCode
|
||||||
|
unitPrice := int(utils.Float64TwoInt64(goodsDetail.SkuMap.SingleSku.CostPrice * 100))
|
||||||
|
if goodsDetail.SkuMap.SingleSku.OuterSkuCode != "" {
|
||||||
|
nameID = int(utils.Str2Int64(goodsDetail.SkuMap.SingleSku.OuterSkuCode))
|
||||||
|
} else {
|
||||||
|
outPutData := DataFailed{
|
||||||
|
GoodsID: goodsID,
|
||||||
|
GoodsName: goodsDetail.Title,
|
||||||
|
Comment: "微盟上没有该商品的商品编码",
|
||||||
|
}
|
||||||
|
dataFailed.AppendData2(outPutData)
|
||||||
|
nameID = -1
|
||||||
|
}
|
||||||
skuList, err := dao.GetStoreSkusByNameIDs(db, storeIDs, nameID)
|
skuList, err := dao.GetStoreSkusByNameIDs(db, storeIDs, nameID)
|
||||||
if len(skuList) > 0 {
|
if len(skuList) > 0 {
|
||||||
if goodsDetail.OuterGoodsCode != "" {
|
if goodsDetail.OuterGoodsCode != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user