1234567891011121314151617181920212223242526272829 |
- package services
- import (
- "hongze/hongze_mfyx/models"
- "hongze/hongze_mfyx/utils"
- )
- func GetChooseCategoryMap(wxUser *models.WxUserItem) (mapResp map[int]bool, err error) {
- if wxUser.Mobile == "" {
- return
- }
- defer func() {
- if err != nil {
- go utils.SendAlarmMsg("GetChooseCategoryMap, ErrMsg: "+err.Error(), 3)
- }
- }()
- mapResp = make(map[int]bool, 0)
- list, err := models.GetCygxXzsChooseCategoryList(wxUser.Mobile)
- if err != nil && err.Error() != utils.ErrNoRow() {
- return
- }
- if len(list) > 0 {
- for _, v := range list {
- mapResp[v.CategoryId] = true
- }
- }
- return
- }
|