using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS.BLL.Services.IService;
using WCS.DAL.Db;
using WCS.DAL.DbModels;
using WCS.Model;
using WCS.Model.ApiModel.Home;

namespace WCS.BLL.Services.Service
{
    public class HomerService : IHomerService
    {
        public HomerService() { }

        public async Task<ResponseBase> GetShelfServer(RequestBase request)
        {
            //直接获取数据库数据 分组进行返回
            var data = await DbHelp.db.Queryable<ShelfInfo>()
                              .Select(t => new GetShelfServerResponseItem()
                              {
                              })
                              .Distinct()
                              .ToListAsync();
            return new GetShelfServerResponse()
            {
                Code = 200,
                Message = "success",
                Data = data
            };
        }
    }
}
