From ec58bf196fb360bfcec35ed784ae9da90ffa3d42 Mon Sep 17 00:00:00 2001 From: jiangshuai <291802688@qq.com> Date: 星期二, 12 十二月 2023 11:06:50 +0800 Subject: [PATCH] 调整listbycondition接口服务 --- models/operation.go | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/models/operation.go b/models/operation.go index 1996968..d076b88 100644 --- a/models/operation.go +++ b/models/operation.go @@ -33,6 +33,7 @@ WaybillNumber string `json:"waybillNumber" gorm:"type:varchar(255);comment:杩愬崟鍙�"` //杩愬崟鍙� Weight decimal.Decimal `gorm:"type:decimal(20,2);comment:閲嶉噺" json:"weight"` //閲嶉噺 LogisticWeight decimal.Decimal `gorm:"type:decimal(20,2);comment:鐗╂祦閲嶉噺" json:"logisticWeight"` //鐗╂祦閲嶉噺 + Source string `json:"source" gorm:"type:varchar(255);comment:鏉ユ簮绯荤粺,鐢ㄤ簬杩斿洖淇敼鐘舵��"` Details []*OperationDetails `json:"details" gorm:"foreignKey:OperationID;references:Id"` BaseOperationType constvar.BaseOperationType `json:"baseOperationType" gorm:"type:tinyint;not null;comment:鍩虹浣滀笟绫诲瀷"` //鍩虹浣滀笟绫诲瀷 @@ -53,6 +54,7 @@ Preload bool Disuse bool Ids []int + Numbers []string } ) @@ -156,8 +158,7 @@ } if slf.Preload { - db = db.Model(&Operation{}).Preload("Details").Preload("Details.Product").Preload("FromLocation"). - Preload("ToLocation").Preload("LogisticCompany") + db = db.Model(&Operation{}).Preload("Details").Preload("Details.Product").Preload("LogisticCompany").Preload("FromLocation").Preload("ToLocation") } if slf.Disuse { -- Gitblit v1.8.0