using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SBF.Business;
using SBF.Model.Dto;
namespace SBF.API.Controllers
{
public class TrusteeshipController : BaseApiController
{
private TrusteeshipBusiness trusteeshipBusiness;
public TrusteeshipController(IHttpContextAccessor httpContextAccessor, TrusteeshipBusiness trusteeshipBusiness) : base(httpContextAccessor)
{
this.trusteeshipBusiness = trusteeshipBusiness;
}
///
/// 搜索Sku参与的推广渠道
///
///
///
[HttpPost]
public IList SearchSkuJoinPopularizeChannel([FromBody] SearchSkuJoinPopularizeChannelRequest request)
{
return trusteeshipBusiness.SearchSkuJoinPopularizeChannel(request);
}
///
/// 查询托管任务列表
///
///
///
[HttpPost]
public ListResponse QueryTrusteeship([FromBody] QueryTrusteeshipRequest request)
{
return trusteeshipBusiness.QueryTrusteeship(request);
}
///
/// 创建托管任务
///
///
[HttpPost]
public void CreateTrusteeship([FromBody] CreateTrusteeshipRequest request)
{
trusteeshipBusiness.CreateTrusteeship(request);
}
///
/// 停止托管
///
/// 任务Id
[HttpPost]
public void StopTrusteeship([FromRoute] long id)
{
trusteeshipBusiness.StopTrusteeship(id);
}
}
}