You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
3.1 KiB
66 lines
3.1 KiB
using BBWY.Client.Models;
|
|
using BBWY.Common.Http;
|
|
using BBWY.Common.Models;
|
|
using System.Collections.Generic;
|
|
using System.Net.Http;
|
|
|
|
namespace BBWY.Client.APIServices
|
|
{
|
|
public class PurchaseService : BaseApiService, IDenpendency
|
|
{
|
|
public PurchaseService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext) { }
|
|
|
|
/// <summary>
|
|
/// 获取采购方案
|
|
/// </summary>
|
|
/// <param name="productIdList"></param>
|
|
/// <param name="purchaserId"></param>
|
|
/// <param name="shopId"></param>
|
|
/// <returns></returns>
|
|
public ApiResponse<IList<PurchaseSchemeResponse>> GetPurchaseSchemeList(IList<string> productIdList, string purchaserId, long shopId)
|
|
{
|
|
return SendRequest<IList<PurchaseSchemeResponse>>(globalContext.BBYWApiHost,
|
|
"api/PurchaseScheme/GetPurchaseSchemeList",
|
|
new { productIdList, purchaserId, shopId },
|
|
null,
|
|
HttpMethod.Post);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取采购方案
|
|
/// </summary>
|
|
/// <param name="skuId"></param>
|
|
/// <param name="shopId"></param>
|
|
/// <returns></returns>
|
|
public ApiResponse<IList<PurchaseSchemeResponse>> GetPurchaseSchemeList(string skuId, long shopId)
|
|
{
|
|
return SendRequest<IList<PurchaseSchemeResponse>>(globalContext.BBYWApiHost,
|
|
"api/PurchaseScheme/GetPurchaseSchemeList",
|
|
new { skuId, shopId },
|
|
null,
|
|
HttpMethod.Post);
|
|
}
|
|
|
|
public ApiResponse<object> EditPurchaseScheme(IList<PurchaseScheme> addPurchaseSchemeList, IList<PurchaseScheme> editPurchaseSchemeList)
|
|
{
|
|
return SendRequest<object>(globalContext.BBYWApiHost,
|
|
"api/purchasescheme/EditPurchaseScheme",
|
|
new
|
|
{
|
|
AddPurchaseSchemeList = addPurchaseSchemeList,
|
|
EditPurchaseSchemeList = editPurchaseSchemeList
|
|
},
|
|
null,
|
|
HttpMethod.Post);
|
|
}
|
|
|
|
public ApiResponse<object> DeletePurchaser(string productId, string purchaserId)
|
|
{
|
|
return SendRequest<object>(globalContext.BBYWApiHost,
|
|
"api/purchasescheme/DeletePurchaser",
|
|
new { productId, purchaserId },
|
|
null,
|
|
HttpMethod.Delete);
|
|
}
|
|
}
|
|
}
|
|
|