From 17aaed743ab7a3520ec8eb9e4ab7c776ca807cdd Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期四, 12 十月 2023 20:43:16 +0800 Subject: [PATCH] bug修改 --- model/receipt.go | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/model/receipt.go b/model/receipt.go index 5c335a9..64c90cd 100644 --- a/model/receipt.go +++ b/model/receipt.go @@ -88,6 +88,9 @@ if slf.SourceId != 0 { db = db.Where("source_id = ?", slf.SourceId) } + if slf.ClientId != 0 { + db = db.Where("client_id = ?", slf.ClientId) + } return db } @@ -124,6 +127,11 @@ return slf } +func (slf *ReceiptSearch) SetClientId(clientId int) *ReceiptSearch { + slf.ClientId = clientId + return slf +} + func (slf *ReceiptSearch) SetOrm(tx *gorm.DB) *ReceiptSearch { slf.Orm = tx return slf -- Gitblit v1.8.0