rs_calendar_api_log.go 1012 B

1234567891011121314151617181920212223242526272829303132333435
  1. package roadshow
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type RsCalendarApiLog struct {
  7. Id int `orm:"column(id);pk"`
  8. Url string `description:"链接"`
  9. Body string `description:"请求参数"`
  10. Result string `description:"返回参数"`
  11. CreateTime time.Time `description:"创建时间"`
  12. Remark string `description:"备注说明"`
  13. RsCalendarResearcherId int `description:"表rs_calendar_researcher 主键ID"`
  14. RsCalendarId int `description:"日历活动id"`
  15. }
  16. // 添加日志记录
  17. func AddRsCalendarApiLog(item *RsCalendarApiLog) (lastId int64, err error) {
  18. o := orm.NewOrm()
  19. lastId, err = o.Insert(item)
  20. return
  21. }
  22. // 批量添加
  23. func AddRsCalendarApiLogList(items []*RsCalendarApiLog) (lastId int64, err error) {
  24. lenitems := len(items)
  25. if lenitems == 0 {
  26. return
  27. }
  28. o := orm.NewOrm()
  29. _, err = o.InsertMulti(lenitems, items)
  30. return
  31. }