using BBWYB.Common.Models;
using WebTest.Models;
using System.Collections.Generic;
using System.Net.Http;
using BBWYB.Common.Http;

namespace WebTest.APIServices
{
    public class ShopService : BaseApiService, IDenpendency
    {
        public ShopService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) { }


        /// <summary>
        /// 获取部门及下属店铺
        /// </summary>
        /// <returns></returns>
        public ApiResponse<IList<DepartmentResponse>> GetDepartmentList()
        {
            return SendRequest<IList<DepartmentResponse>>(globalContext.BBYWApiHost, "api/vender/GetDeparmentList", null,
                new Dictionary<string, string>()
                {
                    { "bbwyTempKey", "21jfhayu27q" }
                }, HttpMethod.Get);
        }

        public ApiResponse<IList<ShopResponse>> GetShopListByIds(IList<string> shopIds)
        {
            return SendRequest<IList<ShopResponse>>(globalContext.BBYWApiHost, "api/vender/GetShopListByShopIds", new
            {
                shopIds
            }, new Dictionary<string, string>()
                {
                    { "bbwyTempKey", "21jfhayu27q" }
                }, HttpMethod.Post);
        }

    }
}