From 53ae121a66b937b532ea762905aaa16953442ddc Mon Sep 17 00:00:00 2001 From: lingling <kety1122@163.com> Date: 星期五, 14 三月 2025 16:39:28 +0800 Subject: [PATCH] 添加地区逻辑 --- LifePayment/LifePayment.Application/User/AccountService.cs | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/LifePayment/LifePayment.Application/User/AccountService.cs b/LifePayment/LifePayment.Application/User/AccountService.cs index 948e4ee..e38604a 100644 --- a/LifePayment/LifePayment.Application/User/AccountService.cs +++ b/LifePayment/LifePayment.Application/User/AccountService.cs @@ -1,4 +1,5 @@ 锘縰sing LifePayment.Application.Contracts; +using LifePayment.Domain; using LifePayment.Domain.Models; using Microsoft.EntityFrameworkCore; using System; @@ -9,31 +10,44 @@ 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 #region 鎿嶄綔 - + #region life pay -- Gitblit v1.9.1