1234567891011121314151617181920212223242526 |
- package services
- import (
- "hongze/hongze_cygx/models"
- "hongze/hongze_cygx/utils"
- )
- func GetReportMappingMap() (mapResp map[int]bool, err error) {
- defer func() {
- if err != nil {
- go utils.SendAlarmMsg("GetReportMappingMap, ErrMsg: "+err.Error(), 3)
- }
- }()
- mapResp = make(map[int]bool, 0)
- list, err := models.GetReportMappingByPermissionName(utils.CE_LUE_NAME)
- if err != nil && err.Error() != utils.ErrNoRow() {
- return
- }
- if len(list) > 0 {
- for _, v := range list {
- mapResp[v.CategoryId] = true
- }
- }
- return
- }
|