分支自 SuZhouGuanHong/TaiYuanTaiZhong

WMS
dengjunjie
2023-12-13 d772a6cddc8ed656a2cb5604fc02f6e891db546e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Text;
 
namespace WIDESEA_Core.Services
{
   public class ActionObserver
    {
        //public ActionObserver(IHttpContextAccessor httpContextAccessor)
        //{
        //    this.RequestDate = DateTime.Now;
        //    this.HttpContext = httpContextAccessor.HttpContext;
        //}
        /// <summary>
        /// 记录action执行的开始时间
        /// </summary>
        public DateTime RequestDate { get; set; }
 
        /// <summary>
        /// 当前请求是否已经写过日志,防止手动与系统自动重复写日志
        /// </summary>
        public bool IsWrite { get; set; }
 
        public HttpContext HttpContext { get; }
    }
}