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.
80 lines
2.5 KiB
80 lines
2.5 KiB
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;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 搜索Sku参与的推广渠道
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public IList<SkuJoinPopularizeChannelResponse> SearchSkuJoinPopularizeChannel([FromBody] SearchSkuJoinPopularizeChannelRequest request)
|
|
{
|
|
return trusteeshipBusiness.SearchSkuJoinPopularizeChannel(request);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询托管任务列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
public ListResponse<TrusteeshipTaskResponse> QueryTrusteeship([FromBody] QueryTrusteeshipRequest request)
|
|
{
|
|
return trusteeshipBusiness.QueryTrusteeship(request);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 创建托管任务
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
[HttpPost]
|
|
public void CreateTrusteeship([FromBody] CreateTrusteeshipRequest request)
|
|
{
|
|
trusteeshipBusiness.CreateTrusteeship(request);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 停止托管
|
|
/// </summary>
|
|
/// <param name="id">任务Id</param>
|
|
[HttpPost("{id}")]
|
|
public void StopTrusteeship([FromRoute] long id)
|
|
{
|
|
trusteeshipBusiness.StopTrusteeship(id);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除托管
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
[HttpPost("id")]
|
|
public void DeleteTrusteehip([FromRoute] long id)
|
|
{
|
|
trusteeshipBusiness.DeleteTrusteehip(id);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询托管任务曲线图详情
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet("{id}")]
|
|
public TrusteeshipTaskResponse GetTrusteeshipTaskCurveResponse([FromRoute] long id)
|
|
{
|
|
return trusteeshipBusiness.GetTrusteeshipTaskCurveResponse(id);
|
|
}
|
|
}
|
|
}
|
|
|