| | |
| | | package service |
| | | |
| | | import ( |
| | | "aps_crm/constvar" |
| | | "aps_crm/model" |
| | | "aps_crm/model/request" |
| | | "aps_crm/pkg/ecode" |
| | | "github.com/shopspring/decimal" |
| | | "gorm.io/gorm" |
| | |
| | | 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 { |