|
|
|
|
using GDZZ.Core;
|
|
|
|
|
using Furion.DependencyInjection;
|
|
|
|
|
using Furion.DynamicApiController;
|
|
|
|
|
using Mapster;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using SqlSugar;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using GDZZ.Application.Entity;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace GDZZ.Application
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 提现管理服务
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ApiDescriptionSettings("Application",Name = "Taking", Order = 1)]
|
|
|
|
|
public class TakingService : ITakingService, IDynamicApiController, ITransient
|
|
|
|
|
{
|
|
|
|
|
private readonly SqlSugarRepository<Taking> _rep;
|
|
|
|
|
|
|
|
|
|
public TakingService(SqlSugarRepository<Taking> rep)
|
|
|
|
|
{
|
|
|
|
|
_rep = rep;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 查询提现列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet("/Mini/Taking/list")]
|
|
|
|
|
public async Task<List<TakingOutput>> List()
|
|
|
|
|
{
|
|
|
|
|
var list = await this._rep.AsQueryable().Where(x => x.CreatedUserId == UserManager.UserId).Select<TakingOutput>().ToListAsync();
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 分页查询提现管理
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet("/Mini/Taking/page")]
|
|
|
|
|
public async Task<dynamic> Page([FromQuery] TakingInput input)
|
|
|
|
|
{
|
|
|
|
|
var entities = await _rep.AsQueryable()
|
|
|
|
|
.WhereIF(!input.Status.IsEmpty(), u => u.Status == input.Status)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.OpenID), u => u.OpenID == input.OpenID)
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.WXOrderNo), u => u.WXOrderNo == input.WXOrderNo)
|
|
|
|
|
.ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
return entities.XnPagedResult();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|