package roadshow import ( "github.com/beego/beego/v2/client/orm" "time" ) type RsCalendarApiLog struct { Id int `orm:"column(id);pk"` Url string `description:"链接"` Body string `description:"请求参数"` Result string `description:"返回参数"` CreateTime time.Time `description:"创建时间"` Remark string `description:"备注说明"` RsCalendarResearcherId int `description:"表rs_calendar_researcher 主键ID"` RsCalendarId int `description:"日历活动id"` } // 添加日志记录 func AddRsCalendarApiLog(item *RsCalendarApiLog) (lastId int64, err error) { o := orm.NewOrm() lastId, err = o.Insert(item) return } // 批量添加 func AddRsCalendarApiLogList(items []*RsCalendarApiLog) (lastId int64, err error) { lenitems := len(items) if lenitems == 0 { return } o := orm.NewOrm() _, err = o.InsertMulti(lenitems, items) return }