user_business_card.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package cygx
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxUserBusinessCard struct {
  7. UserId int `comment:"用户ID"`
  8. Mobile string `comment:"手机号"`
  9. Email string `comment:"邮箱"`
  10. CompanyName string `comment:"公司名称"`
  11. RealName string `comment:"用户实际名称"`
  12. InviteName string `comment:"用户实际名称"`
  13. CreateTime time.Time `comment:"创建时间"`
  14. ModifyTime time.Time `comment:"修改时间"`
  15. RegisterPlatform int `comment:"来源 1小程序,2:网页"`
  16. }
  17. func GetCygxUserBusinessCardList(condition string, pars []interface{}, startSize, pageSize int) (items []*CygxUserBusinessCard, err error) {
  18. o := orm.NewOrmUsingDB("hz_cygx")
  19. sql := `SELECT *
  20. FROM
  21. cygx_user_business_card
  22. WHERE 1 = 1 ` + condition
  23. sql += ` LIMIT ?,? `
  24. _, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
  25. return
  26. }
  27. type InteractionNumInit struct {
  28. Id int `orm:"column(id);pk"`
  29. CompanyId int `description:"用户ID"`
  30. InteractionNum int `description:"研选专栏收藏数量"`
  31. }
  32. func GetInteractionNumInitList() (items []*InteractionNumInit, err error) {
  33. o := orm.NewOrmUsingDB("hz_cygx")
  34. sql := `SELECT *
  35. FROM
  36. interaction_num_init
  37. WHERE 1 = 1 `
  38. _, err = o.Raw(sql).QueryRows(&items)
  39. return
  40. }