lingling
2025-03-14 53ae121a66b937b532ea762905aaa16953442ddc
LifePayment/LifePayment.Application/User/AccountService.cs
@@ -1,4 +1,5 @@
using LifePayment.Application.Contracts;
using LifePayment.Domain;
using LifePayment.Domain.Models;
using Microsoft.EntityFrameworkCore;
using System;
@@ -9,25 +10,38 @@
using Volo.Abp.Domain.Repositories;
using ZeroD.Util;
namespace HumanResourcesServices.Application
namespace LifePayment.Application
{
    public class AccountService : ApplicationService, IAccountService
    {
        private readonly IWxManager _wxManager;
        private readonly IRepository<LifePayUser, Guid> _lifePayUserRepository;
        public AccountService(
               IWxManager wxManager,
               IRepository<LifePayUser, Guid> lifePayUserRepository
)
        {
            _wxManager = wxManager;
            _lifePayUserRepository = lifePayUserRepository;
        }
        #region 查询
        public async Task<WxMiniAppIndentityInfo> GetLifePayWxIndentity(string code)
        {
            var res = await _wxManager.GetWxOauth2AccessToken(code);
            var result = new WxMiniAppIndentityInfo
            {
                SessionKey = res.SessionKey,
                OpenId = res.OpenId,
                UnionId = res.UnionId
            };
            return result;
        }
        #endregion