From 17aaed743ab7a3520ec8eb9e4ab7c776ca807cdd Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期四, 12 十月 2023 20:43:16 +0800 Subject: [PATCH] bug修改 --- service/serviceContract.go | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/service/serviceContract.go b/service/serviceContract.go index 9ca7751..1ef53c8 100644 --- a/service/serviceContract.go +++ b/service/serviceContract.go @@ -1,8 +1,8 @@ package service import ( - "aps_crm/constvar" "aps_crm/model" + "aps_crm/model/request" "aps_crm/pkg/ecode" "github.com/shopspring/decimal" "gorm.io/gorm" @@ -117,13 +117,17 @@ return ecode.OK } -func (SContractService) GetServiceContractList(page, pageSize int, queryClass constvar.ServiceContractQueryClass, keywordType constvar.ServiceContractKeywordType, keyword string) ([]*model.ServiceContract, int64, int) { +func (SContractService) GetServiceContractList(params request.GetServiceContractList) ([]*model.ServiceContract, int64, int) { // get contact list contacts, total, err := model.NewServiceContractSearch(). - SetKeyword(keyword). - SetKeywordType(keywordType). - SetQueryClass(queryClass). - SetPage(page, pageSize). + SetKeyword(params.Keyword). + SetKeywordType(params.KeywordType). + SetQueryClass(params.QueryClass). + SetPage(params.Page, params.PageSize). + SetSalesDetailsId(params.SalesDetailsId). + SetQuotationId(params.QuotationId). + SetSaleChanceId(params.SaleChanceId). + SetContactId(params.ContactId). SetPreload(true). Find() if err != nil { -- Gitblit v1.8.0