From 724674c54da32406a16264850c3719b2553aada6 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期四, 10 八月 2023 19:35:36 +0800
Subject: [PATCH] Merge branch 'master' into fly

---
 model/salesDetails.go |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/model/salesDetails.go b/model/salesDetails.go
index 8deea7f..b318ab7 100644
--- a/model/salesDetails.go
+++ b/model/salesDetails.go
@@ -77,7 +77,7 @@
 	case constvar.SalesDetailsKeywordTypePrincipal:
 		db = db.Joins("left join user on user.id = sales_details.member_id").Where("user.username like ?", fmt.Sprintf("%%%s%%", slf.Keyword))
 	case constvar.SalesDetailsKeywordTypeProductName:
-		//db = db.Joins("left join sales_details_product sdp on sdp.sales_details_id = sales_details.id left join product").Where("user.username like ?", fmt.Sprintf("%%%s%%", slf.Keyword))
+		db = db.Joins("left join sales_details_product sdp on sdp.sales_details_id = sales_details.id left join products on sdp.product_id = products.id").Where("products.name like ?", fmt.Sprintf("%%%s%%", slf.Keyword))
 
 	}
 	if slf.Preload {

--
Gitblit v1.8.0