gushou_time_line_history.go 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package time_line
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxGushouTimeLineHistory struct {
  7. Id int `orm:"column(id);pk"`
  8. TimeLineId int
  9. UserId int
  10. CreateTime time.Time
  11. Mobile string `description:"手机号"`
  12. Email string `description:"邮箱"`
  13. CompanyId int `description:"公司id"`
  14. CompanyName string `description:"公司名称"`
  15. ModifyTime time.Time `description:"修改时间"`
  16. RealName string `description:"用户实际名称"`
  17. SellerName string `description:"所属销售"`
  18. }
  19. // 列表
  20. func GetCygxGushouTimeLineHistoryList(condition string, pars []interface{}) (items []*CygxGushouTimeLineHistory, err error) {
  21. o := orm.NewOrm()
  22. sql := `SELECT * FROM cygx_gushou_time_line_history as art WHERE 1= 1 `
  23. if condition != "" {
  24. sql += condition
  25. }
  26. _, err = o.Raw(sql, pars).QueryRows(&items)
  27. return
  28. }
  29. // 添加
  30. func AddCygxGushouTimeLineHistory(item *CygxGushouTimeLineHistory) (err error) {
  31. o := orm.NewOrm()
  32. _, err = o.Insert(item)
  33. return
  34. }