fix
wangpengfei
2023-07-27 c59053ef98942526930480345636ad3bb7b55596
model/quotation.go
@@ -82,11 +82,19 @@
   return &record, err
}
func (slf *QuotationSearch) FindAll() ([]*Quotation, error) {
func (slf *QuotationSearch) FindAll() ([]*Quotation, int64, error) {
   var db = slf.build()
   var records []*Quotation
   var records = make([]*Quotation, 0)
   if slf.PageNum > 0 && slf.PageSize > 0 {
      db = db.Limit(slf.PageSize).Offset((slf.PageNum - 1) * slf.PageSize)
   }
   var total int64
   if err := db.Count(&total).Error; err != nil {
      return records, total, err
   }
   err := db.Find(&records).Error
   return records, err
   return records, total, err
}
func (slf *QuotationSearch) SetId(id int) *QuotationSearch {