zhangqian
2023-08-05 d3c6646d3d2c7297a2f857bca63d23423c892b7c
回访单关联服务单
1个文件已修改
3 ■■■■ 已修改文件
model/serviceFollowup.go 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/serviceFollowup.go
@@ -13,6 +13,7 @@
        Number               string               `json:"number" gorm:"column:number;type:varchar(255);comment:合同编号"`
        ContactId            int                  `json:"contactId" gorm:"column:contact_id;type:int;comment:联系人id"`
        ServiceId            int                  `json:"serviceId" gorm:"column:service_id;type:int;comment:客户服务单id"`
        ServiceOrder         ServiceOrder         `gorm:"foreignKey:ServiceId"`
        CustomerServiceSheet CustomerServiceSheet `json:"customerServiceSheet" gorm:"foreignKey:ServiceId"`
        MemberId             int                  `json:"memberId" gorm:"column:member_id;type:int;comment:服务人员id"`
        PlanId               int                  `json:"planId" gorm:"column:plan_id;type:int;comment:服务计划id"`
@@ -110,7 +111,7 @@
        db = db.Limit(slf.PageSize).Offset((slf.PageNum - 1) * slf.PageSize)
    }
    err := db.Preload("CustomerServiceSheet").Find(&records).Error
    err := db.Preload("CustomerServiceSheet").Preload("ServiceOrder").Find(&records).Error
    return records, total, err
}