From 16fd3076723f820aa079ff2863f7ab054ab4d0a1 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期二, 19 三月 2024 12:01:44 +0800
Subject: [PATCH] fix空指针

---
 proto/product_inventory/server.go |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/proto/product_inventory/server.go b/proto/product_inventory/server.go
index 274d478..70fdaa1 100644
--- a/proto/product_inventory/server.go
+++ b/proto/product_inventory/server.go
@@ -435,6 +435,9 @@
 			} else {
 				locationSendAmount = productAmount
 			}
+			if locationSendAmount.LessThanOrEqual(decimal.Zero) {
+				continue
+			}
 			productInfoList = append(productInfoList, &service.ProductInfo{
 				ProductID: productNumber,
 				Amount:    locationSendAmount,

--
Gitblit v1.8.0