| | |
| | | ContactPhone string `json:"contact_phone" gorm:"column:contact_phone;type:varchar(255);comment:联系人电话"` |
| | | ContactPosition string `json:"contact_position" gorm:"column:contact_position;type:varchar(255);comment:联系人职位"` |
| | | SalesSourcesId int `json:"sales_sources_id" gorm:"column:sales_sources_id;type:int(11);comment:商机来源ID"` |
| | | SalesSources SalesSources `json:"-" gorm:"foreignKey:SalesSourcesId"` |
| | | SalesSources SalesSources `json:"sales_sources" gorm:"foreignKey:SalesSourcesId"` |
| | | MemberId int `json:"member_id" gorm:"column:member_id;type:int(11);comment:销售负责人ID"` |
| | | Member User `json:"-" gorm:"foreignKey:MemberId"` |
| | | Member User `json:"member" gorm:"foreignKey:MemberId"` |
| | | SalesStatus constvar.SalesStatus `json:"sales_status" gorm:"column:sales_status;type:int(11);comment:销售状态"` |
| | | Desc string `json:"desc" gorm:"column:desc;type:varchar(255);comment:备注"` |
| | | Reason string `json:"reason" gorm:"column:reason;type:text;comment:失败原因"` |
| | |
| | | db = db.Limit(slf.PageSize).Offset((slf.PageNum - 1) * slf.PageSize) |
| | | } |
| | | |
| | | err := db.Preload("Member").Preload("Province").Preload("City").Preload("FollowRecord").Order("id desc").Find(&records).Error |
| | | err := db.Preload("SalesSources").Preload("Member").Preload("Province").Preload("City").Preload("FollowRecord").Order("id desc").Find(&records).Error |
| | | return records, total, err |
| | | } |
| | | |