From e6aa0feda162e9af4672a29213adf2d74b5c4699 Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 10 Oct 2019 17:10:51 +0800 Subject: [PATCH] =?UTF-8?q?CaculateSkuVendorPrice=E6=9C=80=E4=BD=8E?= =?UTF-8?q?=E4=BB=B7=E6=98=AF=E4=B8=80=E5=88=86=E9=92=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxutils/jxutils_cms.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/business/jxutils/jxutils_cms.go b/business/jxutils/jxutils_cms.go index a62a9f1c3..f9e01d968 100644 --- a/business/jxutils/jxutils_cms.go +++ b/business/jxutils/jxutils_cms.go @@ -250,8 +250,8 @@ func CaculateSkuVendorPrice(price, percentage int) (vendorPrice int) { percentage = 100 } vendorPrice = int(math.Round(float64(price*percentage) / 100)) - if vendorPrice < 0 { - vendorPrice = 0 + if vendorPrice < 1 { + vendorPrice = 1 } return vendorPrice }