32 lines
615 B
Go
32 lines
615 B
Go
package controller
|
|
|
|
import (
|
|
"SciencesServer/app/api/website/model"
|
|
model2 "SciencesServer/app/common/model"
|
|
"SciencesServer/app/session"
|
|
)
|
|
|
|
type Docking struct {
|
|
*session.Enterprise
|
|
}
|
|
|
|
type DockingHandle func(session *session.Enterprise) *Docking
|
|
|
|
// Form 联系客服对接
|
|
func (c *Docking) Form() error {
|
|
mServiceDocking := model.NewServiceDocking()
|
|
|
|
if c.Enterprise != nil {
|
|
mServiceDocking.UID = c.UID
|
|
}
|
|
return model2.Create(mServiceDocking.ServiceDocking)
|
|
}
|
|
|
|
func NewDocking() DockingHandle {
|
|
return func(session *session.Enterprise) *Docking {
|
|
return &Docking{
|
|
Enterprise: session,
|
|
}
|
|
}
|
|
}
|