package controllers import ( "eta_gn/eta_api/models" "eta_gn/eta_api/models/company" ) // CompanyPermissionController 客户权限管理 type CompanyPermissionController struct { BaseAuthController } // List // @Title 获取权限设置基础信息 // @Description 获取权限设置基础信息接口 // @Param CompanyType query string true "客户类型:传空字符串或者不传为全部,'ficc','权益'" // @Param NoUpgrade query bool false "是否不展示升级权限,默认为 false" // @Success 200 {object} company.PermissionSetResp // @router /permission/list [get] func (this *CompanyPermissionController) List() { br := new(models.BaseResponse).Init() defer func() { this.Data["json"] = br this.ServeJSON() }() sysUser := this.SysUser if sysUser == nil { br.Msg = "请登录" br.ErrMsg = "请登录,SysUser Is Empty" br.Ret = 408 return } // 非自用无需查询 resp := new(company.PermissionSetResp) br.Ret = 200 br.Success = true br.Msg = "获取成功" br.Data = resp return } // PermissionVariety // @Title 品种 // @Description 品种接口 // @Param CompanyType query string true "客户类型:传空字符串或者不传为全部,'ficc','权益'" // @Success 200 {object} company.PermissionVarietyResp // @router /permission/variety [get] func (this *CompanyPermissionController) PermissionVariety() { br := new(models.BaseResponse).Init() defer func() { this.Data["json"] = br this.ServeJSON() }() sysUser := this.SysUser if sysUser == nil { br.Msg = "请登录" br.ErrMsg = "请登录,SysUser Is Empty" br.Ret = 408 return } br.Ret = 200 br.Success = true br.Msg = "获取成功" return }