李昊 4 yıl önce
ebeveyn
işleme
7901de5c31

+ 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();
+        }
+    }
+}