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