///  <summary>
        /// 在调用操作方法之前发生
        /// </summary>
        /// <param name="context">操作上下文</param>
        public override void OnActionExecuting(ActionExecutingContext context)

        {
            context.HttpContext.Items["ActionId"] = $"{Guid.NewGuid()}";
            context.HttpContext.Items["Ticks"]    = DateTime.Now.Ticks;

            // 验证参数是否为空
            if (context.ActionArguments != null && context.ActionArguments.Values.Any(v => v == null))
            {
                var log = context.HttpContext.CreateActionLog(
                    1, $"参数不能为空|{JsonConvert.SerializeObject(context.ActionArguments)}");
                _log.Warn(log);
                context.Result = new JsonResult(ApiResult <string> .CreateBadRequestResult("参数不能为空"));
                return;
            }

            // 验证参数是否合法
            if (!context.ModelState.IsValid)
            {
                var msg = string.Join(";",
                                      context.ModelState.Where(e => e.Value.Errors.Count > 0)
                                      .SelectMany(e => e.Value.Errors).Select(e =>
                                                                              string.IsNullOrEmpty(e.ErrorMessage) ? e.Exception.Message : e.ErrorMessage));

                var log = context.HttpContext.CreateActionLog(
                    1, $"参数不合法|{JsonConvert.SerializeObject(context.ActionArguments)}|{msg}");
                _log.Warn(log);

                context.Result =
                    new JsonResult(ApiResult <string> .CreateBadRequestResult("参数不合法", "400", msg));
                return;
            }
            _log.Info(context.HttpContext.CreateActionLog(1, JsonConvert.SerializeObject(context.ActionArguments)));
            _log.Info(JsonConvert.SerializeObject(context.HttpContext.CreateActionLog(1, context.HttpContext.Request.QueryString.ToString())));
        }