using BBWYB.Client.Models; using BBWY.Common.Http; using BBWY.Common.Models; using System; using System.Collections.Generic; using System.Net.Http; using System.Text; namespace BBWY.Client.APIServices { public class ShopService : BaseApiService, IDenpendency { public ShopService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) { } public ApiResponse SaveShopSetting(long shopId, string managerPwd, decimal platformCommissionRatio, PurchaseAccount purchaseAccount, string dingDingWebHook, string dingDingKey, int skuSafeTurnoverDays, string siNanDingDingWebHook, string siNanDingDingKey, int siNanPolicyLevel) { return SendRequest(globalContext.BBYWApiHost, "api/vender/SaveShopSetting", new { shopId, managerPwd, platformCommissionRatio, PurchaseAccountId = purchaseAccount.Id, purchaseAccount.AccountName, purchaseAccount.AppKey, purchaseAccount.AppSecret, purchaseAccount.AppToken, purchaseAccount.PurchasePlatformId, dingDingWebHook, dingDingKey, skuSafeTurnoverDays, siNanDingDingWebHook, siNanDingDingKey, siNanPolicyLevel }, null, HttpMethod.Post); } /// /// 根据订单Id查询归属店铺 /// /// /// public ApiResponse> GetOrderBelongShop(IList orderIdList) { return SendRequest>(globalContext.BBYWApiHost, "api/order/GetOrderBelongShop", orderIdList, null, HttpMethod.Post); } /// /// 获取部门及下属店铺 /// /// public ApiResponse> GetDepartmentList() { return SendRequest>(globalContext.BBYWApiHost, "api/vender/GetDeparmentList", null, new Dictionary() { { "bbwyTempKey", "21jfhayu27q" } }, HttpMethod.Get); } public ApiResponse> GetShopListByIds(IList shopIds) { return SendRequest>(globalContext.BBYWApiHost, "api/vender/GetShopListByShopIds", new { shopIds }, new Dictionary() { { "bbwyTempKey", "21jfhayu27q" } }, HttpMethod.Post); } public ApiResponse> GetServiceGroupList() { return SendRequest>(globalContext.BBYWApiHost, "api/vender/GetServiceGroupList", new { globalContext.User.Shop.Platform, globalContext.User.Shop.AppKey, globalContext.User.Shop.AppSecret, globalContext.User.Shop.AppToken, }, null, HttpMethod.Post); } } }