From 3887bb15b5e2662c19825234925c9b6da3fe902f Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 30 八月 2023 14:33:22 +0800
Subject: [PATCH] update

---
 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