From 82c058c91daed212fd9b3807dca9ca80217ce738 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期三, 30 八月 2023 20:25:01 +0800
Subject: [PATCH] fix
---
service/purchase/purchase.go | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/service/purchase/purchase.go b/service/purchase/purchase.go
index 2d72725..2251d8e 100644
--- a/service/purchase/purchase.go
+++ b/service/purchase/purchase.go
@@ -51,11 +51,9 @@
quantity = quantity.Add(product.Amount)
totalPrice = totalPrice.Add(product.Price.Mul(product.Amount))
}
+ record.Quantity = quantity
if !totalPrice.Equal(record.TotalPrice) {
return errors.New("浠风◣鎬昏璁$畻閿欒")
- }
- if !quantity.Equal(record.Quantity) {
- return errors.New("浜у搧鏁伴噺璁$畻閿欒")
}
realTotalPrice = record.CalcRealTotalPrice()
if !realTotalPrice.Equal(record.RealTotalPrice) {
--
Gitblit v1.8.0