LeadsDao.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package dao
  2. import (
  3. . "jjl-tools/tinodeService/lib"
  4. )
  5. type Leads struct {
  6. LeadsId int `json:"leads_id"`
  7. Name string `json:"name"` // 线索名称
  8. Source string `json:"source"` // 线索来源
  9. Telephone string `json:"telephone"` // 电话
  10. Mobile string `json:"mobile"` // 手机
  11. Industry string `json:"industry"` // 客户行业
  12. Remark string `json:"remark"` // 备注
  13. CreateUserId string `json:"create_user_id"` // 创建人ID
  14. OwnerUserId string `json:"owner_user_id"`
  15. CreateTime string `json:"create_time"` // 创建时间
  16. UpdateTime string `json:"update_time"` // 更新时间
  17. WeChat string `json:"we_chat"`
  18. Qq string `json:"qq"`
  19. Ext1 string `json:"ext1"`
  20. Ext2 string `json:"ext2"`
  21. Uid string `json:"uid"`
  22. MobileEncrypted string `json:"mobile_encrypted"`
  23. MobileMask string `json:"mobile_mask"`
  24. City int `json:"city"`
  25. Country int `json:"country"`
  26. }
  27. type LeadsDao struct {
  28. }
  29. func (ra *LeadsDao) TableName() string {
  30. return "leads"
  31. }
  32. //info
  33. func (ra *LeadsDao) GetLeadsInfo(maps map[string]interface{}) (Leads, error) {
  34. var leads Leads
  35. err := GetTiNodeDbInstance().Table(ra.TableName()).Where(maps).Find(&leads).Error
  36. return leads, err
  37. }