1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- package yidong
- import (
- "github.com/beego/beego/v2/client/orm"
- "hongze/hongze_cygx/utils"
- "time"
- )
- type CygxYidongActivityMeetData struct {
- Id string `json:"id" comment:"主键id"`
- YidongMeetDataId string `json:"yidong_meet_data_id" comment:"易董到会信息ID"`
- YidongId string `json:"yidong_id" comment:"活动唯一标识"`
- Title string `json:"title"` // 活动主题
- UserId string `json:"user_id" comment:"用户唯一标识"`
- PersonTelephone string `json:"person_telephone" comment:"电话号码"`
- Duration string `json:"duration" comment:"活动时长"`
- StartTime string `json:"start_time" comment:"活动开始时间"`
- EndTime string `json:"end_time" comment:"活动结束时间"`
- DeviceType string `json:"device_type" comment:"设备类型"`
- Status string `json:"status" comment:"状态"`
- PersonName string `json:"person_name" comment:"用户姓名"`
- JobName string `json:"job_name" comment:"职位名称"`
- Mail string `json:"mail" comment:"电子邮件"`
- CompanyName string `json:"company_name" comment:"公司名称"`
- MobileCountryCode string `json:"mobile_country_code" comment:"手机国家代码"`
- SignUpStatus string `json:"sign_up_status" comment:"报名状态"`
- DurationLive string `json:"duration_live" comment:"直播时长"`
- StartTimeLive string `json:"start_time_live" comment:"直播开始时间"`
- EndTimeLive string `json:"end_time_live" comment:"直播结束时间"`
- DurationReview string `json:"duration_review" comment:"回放时长"`
- StartTimeReview string `json:"start_time_review" comment:"回放开始时间"`
- EndTimeReview string `json:"end_time_review" comment:"回放结束时间"`
- DurationInteract string `json:"duration_interact" comment:"互动时长"`
- StartTimeInteract string `json:"start_time_interact" comment:"互动开始时间"`
- EndTimeInteract string `json:"end_time_interact" comment:"互动结束时间"`
- CreateTime time.Time `comment:"创建时间"`
- }
- // AddCygxYidongActivityMeetDataMulti 批量添加
- func AddCygxYidongActivityMeetDataMulti(items []*CygxYidongActivityMeetData) (err error) {
- if len(items) == 0 {
- return
- }
- o, err := orm.NewOrm().Begin()
- if err != nil {
- return
- }
- defer func() {
- if err == nil {
- o.Commit()
- } else {
- o.Rollback()
- }
- }()
- if len(items) > 0 {
- _, err = o.InsertMulti(1000, items)
- }
- return
- }
- // 列表
- func GetCygxYidongActivityMeetDataListByYidongIds(yidongIds []string) (items []*CygxYidongActivityMeetData, err error) {
- lenarr := len(yidongIds)
- if lenarr == 0 {
- return
- }
- o := orm.NewOrm()
- sql := `SELECT yidong_id,person_telephone FROM cygx_yidong_activity_meet_data WHERE yidong_id IN (` + utils.GetOrmInReplace(lenarr) + `) `
- _, err = o.Raw(sql, yidongIds).QueryRows(&items)
- return
- }
|