From 530fed8ec225453572d57b15c200ab062c335457 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期三, 01 十一月 2023 19:20:21 +0800 Subject: [PATCH] 公海member_id使用0 --- service/receipt.go | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/service/receipt.go b/service/receipt.go index feec40f..b4999cf 100644 --- a/service/receipt.go +++ b/service/receipt.go @@ -130,8 +130,14 @@ return ecode.OK } -func (ReceiptService) GetReceiptList() ([]*model.Receipt, int64, int) { - list, total, err := model.NewReceiptSearch().Find() +func (ReceiptService) GetReceiptList(params request.GetReceiptList) ([]*model.Receipt, int64, int) { + list, total, err := model.NewReceiptSearch(). + SetPage(params.Page, params.PageSize). + SetSourceType(params.SourceType). + SetSourceId(params.SourceId). + SetClientId(params.ClientId). + SetPrincipalIds(params.PrincipleIds). + Find() if err != nil { return nil, 0, ecode.DBErr } @@ -185,7 +191,7 @@ } } err = model.WithTransaction(func(db *gorm.DB) error { - err = model.NewReceiptSearch().SetId(receipt.Id).Save(receipt) + err = model.NewReceiptSearch().SetId(receipt.Id).Update(receipt) if err != nil { return err } -- Gitblit v1.8.0