From 2605c48048a26a6c8467ec619c9620d397103e17 Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期一, 14 八月 2023 17:55:27 +0800 Subject: [PATCH] tmp --- model/saleChance.go | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/model/saleChance.go b/model/saleChance.go index ce24563..2fd5025 100644 --- a/model/saleChance.go +++ b/model/saleChance.go @@ -15,10 +15,13 @@ SalesSourcesId int `json:"sales_sources_id" gorm:"column:sales_sources_id;type:int(11);comment:鍟嗘満鏉ユ簮ID"` SaleTypeId int `json:"sale_type_id" gorm:"column:sale_type_id;type:int(11);comment:鍟嗘満绫诲瀷ID"` SaleStageId int `json:"sale_stage_id" gorm:"column:sale_stage_id;type:int(11);comment:鍟嗘満闃舵ID"` + SaleStage SaleStage `json:"sale_stage" gorm:"foreignKey:SaleStageId;references:Id"` MemberId int `json:"member_id" gorm:"column:member_id;type:int(11);comment:閿�鍞礋璐d汉ID"` + Member User `json:"member" gorm:"foreignKey:MemberId;references:Id"` RegularCustomersId int `json:"regular_customers_id" gorm:"column:regular_customers_id;type:int(11);comment:甯稿ID"` Competitors string `json:"competitors" gorm:"column:competitors;type:varchar(255);comment:绔炰簤瀵规墜"` PossibilitiesId int `json:"possibilities_id" gorm:"column:possibilities_id;type:int(11);comment:鍙兘鎬D"` + Possibility Possibility `json:"possibility" gorm:"foreignKey:PossibilitiesId;references:Id"` Budget float64 `json:"budget" gorm:"column:budget;type:decimal(10,2);comment:棰勭畻"` ProjectedAmount float64 `json:"projected_amount" gorm:"column:projected_amount;type:decimal(10,2);comment:棰勮閲戦"` Currency int `json:"currency" gorm:"column:currency;type:int(11);comment:甯佺"` @@ -152,7 +155,7 @@ db = db.Limit(slf.PageSize).Offset((slf.PageNum - 1) * slf.PageSize) } - err := db.Preload("CollectionProjections").Preload("Client").Preload("Contact").Find(&records).Error + err := db.Preload("SalesSources").Preload("Member").Preload("SaleStage").Preload("Possibility").Preload("CollectionProjections").Preload("Client").Preload("Contact").Find(&records).Error return records, total, err } -- Gitblit v1.8.0