李昊 4 年之前
父節點
當前提交
7901de5c31
共有 1 個文件被更改,包括 34 次插入0 次删除
  1. 34 0
      gx_api/GxPress/Api/GxPress.Api/WebControllers/VipEquityController.cs

+ 34 - 0
gx_api/GxPress/Api/GxPress.Api/WebControllers/VipEquityController.cs

@@ -0,0 +1,34 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using GxPress.Repository.Interface.VipEquity;
+using GxPress.Result.VipEquity;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+
+namespace GxPress.Api.WebControllers
+{
+    /// <summary>
+    /// Vip权益
+    /// </summary>
+    [Route("api/web/vip-equity")]
+    [ApiController]
+    [Authorize]
+    public class VipEquityController : Controller
+    {
+        private readonly IVipEquityRepository vipEquityRepository;
+        public VipEquityController(IVipEquityRepository vipEquityRepository)
+        {
+            this.vipEquityRepository = vipEquityRepository;
+        }
+        /// <summary>
+        /// 获取权益
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet]
+        [AllowAnonymous]
+        public async Task<IEnumerable<VipEquityResult>> GetAllAsync()
+        {
+            return await vipEquityRepository.GetAllAsync();
+        }
+    }
+}