using CloudGaming.Api.Base;
using CloudGaming.Code.Mall;
using CloudGaming.DtoModel.Mall;

using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace CloudGaming.Api.Controllers
{

    /// <summary>
    /// 商城
    /// </summary>
    public class MallController : CloudGamingControllerBase
    {
        public MallController(IServiceProvider _serviceProvider) : base(_serviceProvider)
        {
        }
        /// <summary>
        /// 获取商城数据
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<List<DiamondMallDto>> GetDiamondMall()
        {
            ProductBLL productBLL = new ProductBLL(ServiceProvider);
            return await productBLL.GetDiamondMall();
        }


        /// <summary>
        /// 获取包夜卡数据
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<List<DiamondMallDto>> GetNightCard()
        {
            ProductBLL productBLL = new ProductBLL(ServiceProvider);

            return await productBLL.GetNightCard();
        }

    }
}
