| | |
| | | Remark string `json:"remark" gorm:"column:remark;type:text;comment:备注"` |
| | | Contact Contact `json:"contact" gorm:"foreignKey:ContactId;references:Id"` |
| | | Client Client `json:"client" gorm:"foreignKey:ClientId;references:Id"` |
| | | CollectionProjections []CollectionProjection `json:"collection_projections" gorm:"foreignKey:SaleChanceId"` |
| | | SalesSources SalesSources |
| | | Address |
| | | gorm.Model `json:"-"` |
| | |
| | | db = db.Limit(slf.PageSize).Offset((slf.PageNum - 1) * slf.PageSize) |
| | | } |
| | | |
| | | err := db.Preload("Client").Preload("Contact").Find(&records).Error |
| | | err := db.Preload("CollectionProjections").Preload("Client").Preload("Contact").Find(&records).Error |
| | | return records, total, err |
| | | } |
| | | |