Browse Source

no message

xingzai 1 year ago
parent
commit
62edc44101
1 changed files with 12 additions and 0 deletions
  1. 12 0
      controllers/user.go

+ 12 - 0
controllers/user.go

@@ -248,6 +248,18 @@ func (this *UserController) Detail() {
 	if resp.Headimgurl == "" {
 		resp.Headimgurl = utils.DefaultHeadimgurl
 	}
+	userYanxunaDetail, err := models.GetCygxUserYanxuanPermissionDetailByUserId(user.UserId)
+
+	if err != nil && err.Error() != utils.ErrNoRow() {
+		br.Msg = "获取信息失败"
+		br.ErrMsg = "获取信息失败,GetCygxUserYanxuanPermissionDetailByUserId Err:" + err.Error()
+		return
+	}
+	if userYanxunaDetail != nil {
+		if utils.InArrayByStr(resp.PermissionName, utils.CHART_PERMISSION_NAME_MF_YANXUAN) {
+			resp.PermissionName = append(resp.PermissionName, utils.CHART_PERMISSION_NAME_MF_YANXUAN)
+		}
+	}
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "获取成功"