package controllers import ( "eta/eta_hub/models" "eta/eta_hub/models/system" "eta/eta_hub/utils" ) // 系统用户 type SysAdminController struct { BaseAuthController } // Add // @Title 用户详情信息 // @Description 用户详情信息 // @Param request body system.SysuserAddReq true "type json string" // @Success 200 新增成功 // @router /sysuser/check [get] func (this *SysAdminController) Detail() { br := new(models.BaseResponse).Init() defer func() { this.Data["json"] = br this.ServeJSON() }() var resp system.UserCheckResp userCode := this.GetString("authCode") adminName := utils.DesBase64Decrypt([]byte(userCode), utils.DesKeySalt) admin, err := system.GetSysUserByAdminName(string(adminName)) if err != nil && err.Error() != utils.ErrNoRow(){ br.Msg = "获取失败" br.ErrMsg = "获取失败" + err.Error() return } if admin != nil { resp.IsUser = true resp.AdminInfo = admin } br.Data = resp br.Ret = 200 br.Msg = "获取成功" }