From 82b83161efa3de65ccd74457e9df91900ddc3cd6 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 31 Aug 2022 09:46:11 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=81=E5=8C=A0=E9=93=BA=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E4=B8=BA0=20=E7=9A=84=E8=AE=A2=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/smithy/model_smithy.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/smithy/model_smithy.go b/modules/smithy/model_smithy.go index 23db87ff1..9d537ae1a 100644 --- a/modules/smithy/model_smithy.go +++ b/modules/smithy/model_smithy.go @@ -127,7 +127,13 @@ func (this *modelSmithy) CalculationSmithy(uid string, Smithy *pb.DBSmithy) { if !bCooking { // 经过计算没有烹饪食物的时候 Smithy.Clang = nil } - + sz := make([]*pb.OrderClang, 0) + for _, v := range Smithy.Orders { + if v.Count != 0 { + sz = append(sz, v) + } + } + Smithy.Orders = sz // 保存信息 mapData["orders"] = Smithy.Orders mapData["orderCostTime"] = Smithy.OrderCostTime