Ejemplo n.º 1
0
 /// <summary>
 /// 记录用户操作日志 登录、注册、登出、更新等操作
 /// </summary>
 /// <param name="Action"></param>
 /// <param name="UserId"></param>
 /// <param name="Content"></param>
 public static void Log(UserActionEnum Action, Guid?UserId, string Content)
 {
     using (var client = new UserAccountClient())
     {
         client.LogUserActionAsync(new UserLog()
         {
             Action    = Action,
             UserId    = UserId.HasValue ? UserId.Value : Guid.Empty,
             Content   = Content,
             Channel   = ChannelEnum.H5,
             ChannelIn = nameof(ChannelIn.H5),
             Ip        = HttpContext.Current.Request.UserIp()
         });
     }
 }