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("{id}")]
public void StopTrusteeship([FromRoute] long id)
{
trusteeshipBusiness.StopTrusteeship(id);
}
///
/// 删除托管
///
///
[HttpPost("id")]
public void DeleteTrusteehip([FromRoute] long id)
{
trusteeshipBusiness.DeleteTrusteehip(id);
}
///
/// 查询托管任务曲线图详情
///
///
///
[HttpGet("{id}")]
public TrusteeshipTaskResponse GetTrusteeshipTaskCurveResponse([FromRoute] long id)
{
return trusteeshipBusiness.GetTrusteeshipTaskCurveResponse(id);
}
}
}