VipEquityController.cs 963 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections.Generic;
  2. using System.Threading.Tasks;
  3. using GxPress.Repository.Interface.VipEquity;
  4. using GxPress.Result.VipEquity;
  5. using Microsoft.AspNetCore.Authorization;
  6. using Microsoft.AspNetCore.Mvc;
  7. namespace GxPress.Api.WebControllers
  8. {
  9. /// <summary>
  10. /// Vip权益
  11. /// </summary>
  12. [Route("api/web/vip-equity")]
  13. [ApiController]
  14. [Authorize]
  15. public class VipEquityController : Controller
  16. {
  17. private readonly IVipEquityRepository vipEquityRepository;
  18. public VipEquityController(IVipEquityRepository vipEquityRepository)
  19. {
  20. this.vipEquityRepository = vipEquityRepository;
  21. }
  22. /// <summary>
  23. /// 获取权益
  24. /// </summary>
  25. /// <returns></returns>
  26. [HttpGet]
  27. [AllowAnonymous]
  28. public async Task<IEnumerable<VipEquityResult>> GetAllAsync()
  29. {
  30. return await vipEquityRepository.GetAllAsync();
  31. }
  32. }
  33. }