ficc_report.go 860 B

123456789101112131415161718192021222324252627282930313233
  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) {
  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. for _, v := range listFollw {
  27. mapResp[v.CategoryId] = true
  28. }
  29. return
  30. }