From e095ef6b1d80cd361d9e1478bd86f00b28063996 Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期二, 14 十一月 2023 13:59:26 +0800
Subject: [PATCH] 数据库迁移到aps库

---
 service/test/product.go |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/service/test/product.go b/service/test/product.go
index 1079d11..b4d05c2 100644
--- a/service/test/product.go
+++ b/service/test/product.go
@@ -56,7 +56,7 @@
 	// 濡傛灉鏈夋潯浠舵悳绱� 涓嬫柟浼氳嚜鍔ㄥ垱寤烘悳绱㈣鍙�
 	//鎼滅储妗嗗悎涓�娣诲姞鏌ヨ鏉′欢
 	if info.Keyword != "" {
-		db = db.Where("Product.name LIKE ?", "%"+info.Keyword+"%").Joins("Supplier").Or("Supplier.name LIKE ?", "%"+info.Keyword+"%")
+		db = db.Where("srm_product.name LIKE ?", "%"+info.Keyword+"%").Joins("srm_supplier").Or("srm_supplier.name LIKE ?", "%"+info.Keyword+"%")
 	}
 	if info.StartCreatedAt != nil && info.EndCreatedAt != nil {
 		db = db.Where("created_at BETWEEN ? AND ?", info.StartCreatedAt, info.EndCreatedAt)
@@ -100,7 +100,7 @@
 	}
 
 	if info.SupplierNumber != "" {
-		db = db.Joins("Supplier").Where("Supplier.number LIKE ?", "%"+info.SupplierNumber+"%")
+		db = db.Joins("srm_supplier").Where("srm_supplier.number LIKE ?", "%"+info.SupplierNumber+"%")
 	}
 
 	if info.DeliveryTime != 0 {

--
Gitblit v1.8.0