tactics_time_line_history.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. package cygx
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "hongze/hz_crm_api/utils"
  5. "strconv"
  6. "time"
  7. )
  8. type CygxTacticsTimeLineHistory struct {
  9. Id int `orm:"column(id);pk"`
  10. TimeLineId int
  11. UserId int
  12. CreateTime time.Time
  13. Mobile string `description:"手机号"`
  14. Email string `description:"邮箱"`
  15. CompanyId int `description:"公司id"`
  16. CompanyName string `description:"公司名称"`
  17. ModifyTime time.Time `description:"修改时间"`
  18. RealName string `description:"用户实际名称"`
  19. SellerName string `description:"所属销售"`
  20. }
  21. // 列表
  22. func GetCygxTacticsTimeLineHistoryList(condition string, pars []interface{}) (items []*CygxTacticsTimeLineHistory, err error) {
  23. o := orm.NewOrmUsingDB("hz_cygx")
  24. sql := `SELECT * FROM cygx_tactics_time_line_history as art WHERE 1= 1 `
  25. condition += ` AND company_id != ` + strconv.Itoa(utils.HZ_COMPANY_ID) // 过滤弘则来源
  26. if condition != "" {
  27. sql += condition
  28. }
  29. _, err = o.Raw(sql, pars).QueryRows(&items)
  30. return
  31. }