From 87b0ae0a2aca16763bf054c4c785323e36f68387 Mon Sep 17 00:00:00 2001 From: sunpengfei <i@angelzzz.com> Date: 星期三, 11 六月 2025 17:46:28 +0800 Subject: [PATCH] fix:用户端--我的--数据看板,昨日活跃用户数据统计不正确,统计的是登录账号所配置的渠道中昨日进行充值且充值成功的用户记录 --- LifePayment/LifePayment.HttpApi/LifePay/LogController.cs | 27 +++++++-------------------- 1 files changed, 7 insertions(+), 20 deletions(-) diff --git a/LifePayment/LifePayment.HttpApi/LifePay/LogController.cs b/LifePayment/LifePayment.HttpApi/LifePay/LogController.cs index 33d74d0..c00fb9a 100644 --- a/LifePayment/LifePayment.HttpApi/LifePay/LogController.cs +++ b/LifePayment/LifePayment.HttpApi/LifePay/LogController.cs @@ -1,31 +1,19 @@ -锘縰sing Castle.Core.Logging; -using LifePayment.Application.Sync; +锘縰sing LifePayment.Application.Contracts; using LifePayment.Domain.Shared; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Volo.Abp.AspNetCore.Mvc; -using ZeroD.Util; -namespace LifePayment.HttpApi.LifePay +namespace LifePayment.HttpApi { [Route("api/[controller]/[action]")] [ApiController] public class LogController : AbpController { - private readonly ILogger<LogController> logger; - private readonly IHttpContextAccessor httpContextAccessor; + private readonly ILogService logService; - public LogController( - ILogger<LogController> logger, - IHttpContextAccessor httpContextAccessor) + public LogController(ILogService logService) { - this.logger = logger; - this.httpContextAccessor = httpContextAccessor; + this.logService = logService; } /// <summary> @@ -33,10 +21,9 @@ /// </summary> /// <returns></returns> [HttpPost] - public void LogFront(LogFrontInput message) + public async void LogFront(LogFrontInput message) { - string ip = httpContextAccessor.HttpContext?.Connection?.RemoteIpAddress?.ToString(); - logger.LogInformation($"鍓嶇鏃ュ織锛圛P-{ip}锛夛細{message.ToJson()}"); + await logService.LogFront(message); } } } -- Gitblit v1.9.1