From 06db0a18315c6ca0a2016293ed108d2332cd4a83 Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期五, 01 九月 2023 16:13:15 +0800 Subject: [PATCH] fix --- service/test/product.go | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/service/test/product.go b/service/test/product.go index f98b2ed..7bc0813 100644 --- a/service/test/product.go +++ b/service/test/product.go @@ -99,6 +99,14 @@ db = db.Joins("Supplier").Where("Supplier.number LIKE ?", "%"+info.SupplierNumber+"%") } + if info.DeliveryTime != 0 { + db = db.Where("delivery_time = ?", info.DeliveryTime) + } + + if info.ShippingDuration != 0 { + db = db.Where("shipping_duration = ?", info.ShippingDuration) + } + err = db.Count(&total).Error if err != nil { return -- Gitblit v1.8.0