实时在线用户功能

This commit is contained in:
橙子
2022-10-03 17:04:59 +08:00
parent e963a4051f
commit 3943536485
25 changed files with 528 additions and 33 deletions

View File

@@ -51,8 +51,8 @@ namespace Yi.Framework.WebCore.AttributeExtend
//根据ip获取地址
//var ipTool = IpTool.Search(ip);
//string location = ipTool.Province + " " + ipTool.City;
var ipTool = IpTool.Search(ip);
string location = ipTool.Province + " " + ipTool.City;
//日志服务插入一条操作记录即可
@@ -66,6 +66,7 @@ namespace Yi.Framework.WebCore.AttributeExtend
logEntity.Method = context.HttpContext.Request.Path.Value;
logEntity.IsDeleted = false;
logEntity.OperUser= context.HttpContext.GetUserNameInfo();
logEntity.OperLocation = location;
if (logAttribute.IsSaveResponseData)
{
if (context.Result is ContentResult result && result.ContentType == "application/json")