public string login(string username, string password, string code, string uuid, RequestBasicInfo info)
        {
            string verifyKey = YouGeSystemConst.CAPTCHA_CODE_KEY + uuid;

            string captcha = YouGeRedisHelper.Get(verifyKey);

            YouGeRedisHelper.Del(verifyKey);
            if (captcha == null)
            {
                //启动线程 记录日志
                var ta = new Task(() =>

                                  sysLoginRepository.recordLogininfor(username, YouGeSystemConst.FAIL, "没有验证码", info)
                                  );
                ta.Start();

                throw new CaptchaExpireException();
            }

            if (!string.Equals(code, captcha, StringComparison.OrdinalIgnoreCase))
            {
                var tb = new Task(() =>
                                  sysLoginRepository.recordLogininfor(username, YouGeSystemConst.FAIL, "验证码已失效", info)
                                  );
                tb.Start();
                throw new CaptchaException();
            }
            try
            {
                LoginUser loginUser = this.loadUserByUsername(username, password);
                var       tf        = new Task(() =>
                                               sysLoginRepository.recordLogininfor(username, YouGeSystemConst.SUCCESS, "登录成功", info)
                                               );
                tf.Start();
                // 生成token
                return(tokenService.createToken(loginUser, info));
            }
            catch (Exception e)
            {
                if (e.Message.Contains("密码错误"))
                {
                    var tc = new Task(() =>
                                      sysLoginRepository.recordLogininfor(username, YouGeSystemConst.FAIL, "用户不存在/密码错误", info)
                                      );
                    tc.Start();


                    throw new UserPasswordNotMatchException();
                }
                else
                {
                    var td = new Task(() =>
                                      sysLoginRepository.recordLogininfor(username, YouGeSystemConst.FAIL, e.Message, info)
                                      );
                    td.Start();

                    throw new CustomException(e.Message);
                }
            }
        }