刷新京西价?

This commit is contained in:
苏尹岚
2020-06-16 14:47:07 +08:00
parent 51bb8f1cc0
commit 7f883e7742

View File

@@ -2350,7 +2350,7 @@ func ReCalculateJxPrice(db *dao.DaoDB, ctx *jxcontext.Context, storeIDs []int) (
if storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJX); err == nil { if storeDetail, err := dao.GetStoreDetail(db, storeID, model.VendorIDJX); err == nil {
if storeSkuList, err := dao.GetStoresSkusInfo(db, []int{storeID}, nil); err == nil { if storeSkuList, err := dao.GetStoresSkusInfo(db, []int{storeID}, nil); err == nil {
for _, skuBind := range storeSkuList { for _, skuBind := range storeSkuList {
skuBind.JxPrice = jxutils.CaculatePriceByPricePack(storeDetail.PricePercentagePackObj, 0, skuBind.Price) skuBind.JxPrice = jxutils.CaculatePriceByPricePack(storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage), skuBind.Price)
dao.UpdateEntity(db, skuBind, "JxPrice") dao.UpdateEntity(db, skuBind, "JxPrice")
} }
} else { } else {