1234567891011121314151617181920212223242526 |
- package services
- import (
- "errors"
- "fmt"
- "hongze/hongze_clpt/models"
- "hongze/hongze_clpt/utils"
- )
- // 判断用户是否开通了个人研选权限
- func GetMfyxUserPermissionTotal(userId int) (toatal int) {
- var err error
- defer func() {
- if err != nil {
- fmt.Println(err)
- go utils.SendAlarmMsg(fmt.Sprint("判断用户是否开通了个人研选权限失败 GetMfyxUserPermissionTotal userId", userId, ",err:", err.Error()), 2)
- }
- }()
- //判断用户是否开通了个人研选权限,如果有权限后缀拼接权限名称
- toatal, e := models.GetCygxUserYanxuanPermissionCountByUserId(userId)
- if e != nil {
- err = errors.New("GetCygxUserYanxuanPermissionCountByUserId, Err: " + e.Error())
- return
- }
- return
- }
|