From a5f2694d9ca3876208041582f2856be83a06e764 Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期二, 23 四月 2024 10:57:28 +0800 Subject: [PATCH] 库存调整修改4 --- models/month_stats.go | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/models/month_stats.go b/models/month_stats.go index 7d73f36..a40c003 100644 --- a/models/month_stats.go +++ b/models/month_stats.go @@ -177,7 +177,8 @@ } if slf.Keyword != "" { - db = db.Where("product_name like ?", fmt.Sprintf("%%%v%%", slf.Keyword)) + kw := fmt.Sprintf("%%%v%%", slf.Keyword) + db = db.Where("product_id like ? or product_name like ?", kw, kw) } if slf.Date != "" { -- Gitblit v1.8.0