From a6c23dcfedf8b655253ab1cdc4c6135a4e3c4cc9 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期四, 06 七月 2023 17:07:51 +0800
Subject: [PATCH] fix

---
 model/saleChance.go |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/model/saleChance.go b/model/saleChance.go
index 7848b68..2bc6a2b 100644
--- a/model/saleChance.go
+++ b/model/saleChance.go
@@ -37,6 +37,9 @@
 		Disadvantages      string                `json:"disadvantages" gorm:"column:disadvantages;type:text;comment:绔炰簤鍔e娍"`
 		Opportunities      string                `json:"opportunities" gorm:"column:opportunities;type:text;comment:绔炰簤鏈轰細"`
 		Threats            string                `json:"threats" gorm:"column:threats;type:text;comment:绔炰簤濞佽儊"`
+		Contact            Contact               `json:"contact" gorm:"foreignKey:ContactId;references:Id"`
+		Client             Client                `json:"client" gorm:"foreignKey:ClientId;references:Id"`
+		SalesSources       SalesSources
 		Address
 		gorm.Model `json:"-"`
 	}
@@ -93,7 +96,7 @@
 
 func (slf *SaleChangeSearch) FindAll() (record []*SaleChance, err error) {
 	var db = slf.build()
-	err = db.Find(&record).Error
+	err = db.Preload("Client").Preload("Contact").Find(&record).Error
 	return
 }
 

--
Gitblit v1.8.0