ficc_report.go 970 B

1234567891011121314151617181920212223242526272829303132333435
  1. package services
  2. import (
  3. "errors"
  4. "fmt"
  5. "hongze/hongze_clpt/models"
  6. "hongze/hongze_clpt/utils"
  7. )
  8. // GetXzsChooseCategoryZhouqiMapByMobile 根据手机号获取周期分类的关注信息
  9. func GetXzsChooseCategoryZhouqiMapByMobile(mobile string) (mapResp map[int]bool, mapFollowResp map[int]int) {
  10. if mobile == "" {
  11. return
  12. }
  13. var err error
  14. defer func() {
  15. if err != nil {
  16. fmt.Println("err:", err)
  17. go utils.SendAlarmMsg(fmt.Sprint("更新周期对应分类下所管理文章的更新时间 失败,GetXzsChooseCategoryZhouqiMapByMobile Err:"+err.Error()+"mobile", mobile), 3)
  18. }
  19. }()
  20. listFollw, e := models.GetCygxXzsChooseCategoryZhouqiList(mobile)
  21. if e != nil {
  22. err = errors.New("GetCygxZhouqiArticleMapByParentId, Err: " + err.Error())
  23. return
  24. }
  25. mapResp = make(map[int]bool, 0)
  26. mapFollowResp = make(map[int]int, 0)
  27. for _, v := range listFollw {
  28. mapResp[v.CategoryId] = true
  29. mapFollowResp[v.CategoryId] = v.FollowType
  30. }
  31. return
  32. }