liujiandao
2023-10-12 17aaed743ab7a3520ec8eb9e4ab7c776ca807cdd
service/salesReturn.go
@@ -3,6 +3,7 @@
import (
   "aps_crm/constvar"
   "aps_crm/model"
   "aps_crm/model/request"
   "aps_crm/pkg/ecode"
   "github.com/shopspring/decimal"
   "gorm.io/gorm"
@@ -123,12 +124,14 @@
   return ecode.OK
}
func (SalesReturnService) GetSalesReturnList(page, pageSize int, keywordType constvar.SalesReturnKeywordType, keyword string) ([]*model.SalesReturn, int64, int) {
func (SalesReturnService) GetSalesReturnList(params request.GetSalesReturnList) ([]*model.SalesReturn, int64, int) {
   // get contact list
   contacts, total, err := model.NewSalesReturnSearch().
      SetKeywordType(keywordType).
      SetKeyword(keyword).
      SetPage(page, pageSize).
      SetKeywordType(params.KeywordType).
      SetKeyword(params.Keyword).
      SetPage(params.Page, params.PageSize).
      SetSourceId(params.SourceId).
      SetSourceType(params.SourceType).
      SetPreload(true).
      FindAll()
   if err != nil {