| | |
| | | "aps_crm/router" |
| | | "aps_crm/service" |
| | | "fmt" |
| | | "github.com/robfig/cron/v3" |
| | | "net/http" |
| | | "os" |
| | | "os/signal" |
| | |
| | | go v1.InitProductServiceConn() |
| | | go service.InitUserConn() |
| | | |
| | | c := cron.New() |
| | | c.AddFunc("@every 15s", service.SyncUserInfo) // 每15秒同步一次 |
| | | c.Start() |
| | | //c := cron.New() |
| | | //c.AddFunc("@every 15s", service.SyncUserInfo) // 每15秒同步一次 |
| | | //c.Start() |
| | | |
| | | logx.Error(server.ListenAndServe().Error()) |
| | | } |
| | |
| | | type ( |
| | | // SalesReturnProduct 服务合同和产品关联 |
| | | SalesReturnProduct struct { |
| | | SalesReturnId int `json:"id" gorm:"column:sales_details_id;type:int;primary_key;not null;default:0"` |
| | | SalesReturnId int `json:"id" gorm:"column:service_contract_id;type:int;primary_key;not null;default:0"` |
| | | ProductId uint `json:"name" gorm:"primary_key;column:product_id;type:int;not null;default:0;comment:产品id"` |
| | | } |
| | | |