From a1686e58e2bddc6841f8db59804b459f91a4400a Mon Sep 17 00:00:00 2001 From: gazebo Date: Wed, 24 Jul 2019 16:54:21 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E6=B4=BB=E5=8A=A8=E8=A1=A5=E8=B4=B4?= =?UTF-8?q?=E5=BC=BA=E5=88=B6=E8=AE=BE=E7=BD=AE=E6=B4=BB=E5=8A=A8=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC=E4=B8=BA0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/act/act.go | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index bba7cb4ec..44c15ea5c 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -130,17 +130,21 @@ func ActStoreSkuParam2Model(ctx *jxcontext.Context, db *dao.DaoDB, act *model.Ac VendorPrice: int64(jxutils.CaculateSkuVendorPrice(storeSkuInfo.Price, pricePercentage, 0)), } v.OriginalPrice = actSkuMap.VendorPrice - if v.ActPrice != 0 { - actSkuMap.ActualActPrice = v.ActPrice + if act.Type == model.ActSkuFake { + actSkuMap.ActualActPrice = 0 } else { - percentage := act.PricePercentage - if v.PricePercentage != 0 { - percentage = v.PricePercentage + if v.ActPrice != 0 { + actSkuMap.ActualActPrice = v.ActPrice + } else { + percentage := act.PricePercentage + if v.PricePercentage != 0 { + percentage = v.PricePercentage + } + actSkuMap.ActualActPrice = int64(jxutils.CaculateSkuVendorPrice(int(actSkuMap.VendorPrice), percentage, 0)) + } + if actSkuMap.ActualActPrice <= 0 { + actSkuMap.ActualActPrice = 1 } - actSkuMap.ActualActPrice = int64(jxutils.CaculateSkuVendorPrice(int(actSkuMap.VendorPrice), percentage, 0)) - } - if actSkuMap.ActualActPrice <= 0 { - actSkuMap.ActualActPrice = 1 } if actSkuMap.ActualActPrice >= actSkuMap.VendorPrice { wrongSkuList = append(wrongSkuList, v)