sunpengfei
9 天以前 88e55d4e4cf306ab62d63346af50ff7fc7526ba2
FlexJobApi.UserServer.Application/EnterpriseWallets/Commands/GetAlipayNotifyCommandHandler.cs
@@ -1,5 +1,7 @@
using FlexJobApi.Core;
using Furion;
using MediatR;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -11,9 +13,14 @@
    /// <summary>
    /// 支付宝通知回传
    /// </summary>
    public class GetAlipayNotifyCommandHandler :
        IRequestHandler<GetAlipayNotifyCommand, bool>
    public class GetAlipayNotifyCommandHandler(
            IHttpContextAccessor httpContextAccessor
        ) :
        IRequestHandler<GetAlipayNotifyCommand, bool>,
        IRequestHandler<AlipayUserAgreementPageSignNotifyCommand, bool>
    {
        private readonly IHttpContextAccessor httpContextAccessor = httpContextAccessor;
        /// <summary>
        /// 支付宝通知回传
        /// </summary>
@@ -24,5 +31,17 @@
        {
            return Task.FromResult(true);
        }
        /// <summary>
        /// 支付宝用户授权协议签约通知
        /// </summary>
        /// <param name="request"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        public Task<bool> Handle(AlipayUserAgreementPageSignNotifyCommand request, CancellationToken cancellationToken)
        {
            Console.WriteLine(httpContextAccessor.HttpContext.Request.QueryString);
            return Task.FromResult(true);
        }
    }
}