You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

49 lines
1.4 KiB

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Znyc.CloudCar.IServices.Currency;
using Znyc.CloudCar.Model.ViewModels.ReportsCallBack;
namespace Znyc.CloudCar.Controller
{
/// <summary>
/// 用户云币管理
/// </summary>
public class CurrencyController : ControllerBase
{
private readonly ICurrencyService _currencyService;
public CurrencyController(
ICurrencyService currencyService
)
{
_currencyService = currencyService;
}
/// <summary>
/// 获取用户云币信息
/// </summary>
/// <returns></returns>
[HttpGet]
[Authorize]
[Route("api/v1/currency")]
public async Task<ResponseOutput> GetAsync()
{
return await _currencyService.GetAsync();
}
/// <summary>
/// 云币账单
/// </summary>
/// <param name="currencyType">0-全部/1-增加/2-减少</param>
/// <param name="currentPage"></param>
/// <param name="pageSize"></param>
/// <returns></returns>
[HttpGet]
[Authorize]
[Route("api/v1/currency/search")]
public async Task<ResponseOutput> PageAsync(int currencyType, int currentPage = 1, int pageSize = 10)
{
return await _currencyService.PageAsync(currencyType, currentPage, pageSize);
}
}
}