| | |
| | | using LifePayment.Application.Contracts; |
| | | using LifePayment.Domain; |
| | | using LifePayment.Domain.Models; |
| | | using Microsoft.EntityFrameworkCore; |
| | | using System; |
| | |
| | | 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 |
| | | |