|
|
@ -20,6 +20,8 @@ using System.IO;
|
|
|
|
using System.Text;
|
|
|
|
using System.Text;
|
|
|
|
using Senparc.Weixin.Exceptions;
|
|
|
|
using Senparc.Weixin.Exceptions;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
using Mapster;
|
|
|
|
|
|
|
|
|
|
|
|
namespace GDZZ.Application.Service.WXPay
|
|
|
|
namespace GDZZ.Application.Service.WXPay
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -33,7 +35,7 @@ namespace GDZZ.Application.Service.WXPay
|
|
|
|
private readonly SqlSugarRepository<SysUser> _sysUserRep; // 用户表仓储
|
|
|
|
private readonly SqlSugarRepository<SysUser> _sysUserRep; // 用户表仓储
|
|
|
|
private readonly SqlSugarRepository<SysTenant> _sysTenantRep; //租户仓储
|
|
|
|
private readonly SqlSugarRepository<SysTenant> _sysTenantRep; //租户仓储
|
|
|
|
private readonly SqlSugarRepository<SeIF> self; //职业仓储
|
|
|
|
private readonly SqlSugarRepository<SeIF> self; //职业仓储
|
|
|
|
private readonly SqlSugarRepository<Balance> balance; //职业仓储
|
|
|
|
private readonly SqlSugarRepository<Balance> balance; //余额仓储
|
|
|
|
|
|
|
|
|
|
|
|
private readonly SqlSugarRepository<MiniRecharge> rechargeRep; //充值仓储
|
|
|
|
private readonly SqlSugarRepository<MiniRecharge> rechargeRep; //充值仓储
|
|
|
|
private readonly SqlSugarRepository<MiniPayTake> payTakeRep; //支付仓储
|
|
|
|
private readonly SqlSugarRepository<MiniPayTake> payTakeRep; //支付仓储
|
|
|
@ -85,7 +87,7 @@ namespace GDZZ.Application.Service.WXPay
|
|
|
|
[Route("Mini/v1/GetUserBalance")]
|
|
|
|
[Route("Mini/v1/GetUserBalance")]
|
|
|
|
public async Task<BalanceOut> GetUserBalance()
|
|
|
|
public async Task<BalanceOut> GetUserBalance()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var balan = await this.balance.SingleAsync(x => x.UserID == UserManager.UserId);
|
|
|
|
var balan = await this.balance.AsQueryable().Filter("TenantId", true).SingleAsync(x => x.UserID == UserManager.UserId);
|
|
|
|
if (balan == null)
|
|
|
|
if (balan == null)
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
|
|
|
|
|
|
|
@ -96,6 +98,18 @@ namespace GDZZ.Application.Service.WXPay
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 充值记录查询
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
[HttpGet]
|
|
|
|
|
|
|
|
[Route("Mini/v1/GetRechargeList")]
|
|
|
|
|
|
|
|
public async Task<List<RechargeOut>> GetRechargeList()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var rechargeLiist = this.rechargeRep.Where(x => x.CreatedUserId == UserManager.UserId).ToListAsync();
|
|
|
|
|
|
|
|
return rechargeLiist.Adapt<List<RechargeOut>>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|