|
|
|
using BBWY.Server.Business.Sync;
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
using System;
|
|
|
|
|
|
|
|
namespace BBWY.Server.API.Controllers
|
|
|
|
{
|
|
|
|
|
|
|
|
public class JDPopularizeSyncController : BaseApiController
|
|
|
|
{
|
|
|
|
private JDPopularizeSyncBusiness jdPopularizeSyncBusiness;
|
|
|
|
private JDPopularizeReportFormSkuLevelSyncBusiness jdPopularizeReportFormSkuLevelSyncBusiness;
|
|
|
|
private JDPopularizeReportFormAdLevelSyncBusiness jdPopularizeReportFormAdLevelSyncBusiness;
|
|
|
|
private JDPopularizeReportFormAdGroupLevelSyncBusiness jdPopularizeReportFormAdGroupLevelSyncBusiness;
|
|
|
|
private JDPopularizeReportFormCampaignLevelSyncBusiness jdPopularizeReportFormCampaignLevelSyncBusiness;
|
|
|
|
private JDPopularizeReportFormOrderLevelSyncBusiness jdPopularizeReportFormOrderLevelSyncBusiness;
|
|
|
|
public JDPopularizeSyncController(IHttpContextAccessor httpContextAccessor,
|
|
|
|
JDPopularizeSyncBusiness jdPopularizeSyncBusiness,
|
|
|
|
JDPopularizeReportFormSkuLevelSyncBusiness jdPopularizeReportFormSkuLevelSyncBusiness,
|
|
|
|
JDPopularizeReportFormAdLevelSyncBusiness jdPopularizeReportFormAdLevelSyncBusiness,
|
|
|
|
JDPopularizeReportFormAdGroupLevelSyncBusiness jdPopularizeReportFormAdGroupLevelSyncBusiness,
|
|
|
|
JDPopularizeReportFormCampaignLevelSyncBusiness jdPopularizeReportFormCampaignLevelSyncBusiness, JDPopularizeReportFormOrderLevelSyncBusiness jdPopularizeReportFormOrderLevelSyncBusiness) : base(httpContextAccessor)
|
|
|
|
{
|
|
|
|
this.jdPopularizeSyncBusiness = jdPopularizeSyncBusiness;
|
|
|
|
this.jdPopularizeReportFormSkuLevelSyncBusiness = jdPopularizeReportFormSkuLevelSyncBusiness;
|
|
|
|
this.jdPopularizeReportFormAdLevelSyncBusiness = jdPopularizeReportFormAdLevelSyncBusiness;
|
|
|
|
this.jdPopularizeReportFormAdGroupLevelSyncBusiness = jdPopularizeReportFormAdGroupLevelSyncBusiness;
|
|
|
|
this.jdPopularizeReportFormCampaignLevelSyncBusiness = jdPopularizeReportFormCampaignLevelSyncBusiness;
|
|
|
|
this.jdPopularizeReportFormOrderLevelSyncBusiness = jdPopularizeReportFormOrderLevelSyncBusiness;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 同步全店推广记录
|
|
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
|
|
public void SyncAllShopPopularizeRecord()
|
|
|
|
{
|
|
|
|
jdPopularizeSyncBusiness.SyncAllShopPopularizeRecord();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 同步指定条件的推广记录
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="shopId"></param>
|
|
|
|
/// <param name="startDate"></param>
|
|
|
|
/// <param name="endDate"></param>
|
|
|
|
[HttpGet]
|
|
|
|
public void SyncShopPopularizeRecordByDate(long? shopId, DateTime startDate, DateTime endDate)
|
|
|
|
{
|
|
|
|
jdPopularizeSyncBusiness.SyncShopPopularizeRecordByDate(shopId, startDate, endDate);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 同步全店推广报表-sku维度
|
|
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
|
|
public void SyncAllShopPopularizeReportFormSkuLevel()
|
|
|
|
{
|
|
|
|
jdPopularizeReportFormSkuLevelSyncBusiness.SyncAllShopPopularizeReportFormSkuLevel();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 同步指定条件的推广报表-sku维度
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="shopId"></param>
|
|
|
|
/// <param name="startDate"></param>
|
|
|
|
/// <param name="endDate"></param>
|
|
|
|
[HttpGet]
|
|
|
|
public void SyncShopPopularizeReportFormSkuLevelByDate(long? shopId, DateTime startDate, DateTime endDate)
|
|
|
|
{
|
|
|
|
jdPopularizeReportFormSkuLevelSyncBusiness.SyncShopPopularizeReportFormSkuLevelByDate(shopId, startDate, endDate);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 同步全店推广报表-创意维度
|
|
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
|
|
public void SyncAllShopPopularizeReportFormAdLevel()
|
|
|
|
{
|
|
|
|
jdPopularizeReportFormAdLevelSyncBusiness.SyncAllShopPopularizeReportFormAdLevel();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 同步指定条件的推广报表-创意维度
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="shopId"></param>
|
|
|
|
/// <param name="startDate"></param>
|
|
|
|
/// <param name="endDate"></param>
|
|
|
|
[HttpGet]
|
|
|
|
public void SyncShopPopularizeReportFormAdLevelByDate(long? shopId, DateTime startDate, DateTime endDate)
|
|
|
|
{
|
|
|
|
jdPopularizeReportFormAdLevelSyncBusiness.SyncShopPopularizeReportFormAdLevelByDate(shopId, startDate, endDate);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 同步全店推广报表-单元维度
|
|
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
|
|
public void SyncAllShopPopularizeReportFormAdGroupLevel()
|
|
|
|
{
|
|
|
|
jdPopularizeReportFormAdGroupLevelSyncBusiness.SyncAllShopPopularizeReportFormAdGroupLevel();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 同步指定条件的推广报表-单元维度
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="shopId"></param>
|
|
|
|
/// <param name="startDate"></param>
|
|
|
|
/// <param name="endDate"></param>
|
|
|
|
[HttpGet]
|
|
|
|
public void SyncShopPopularizeReportFormAdGroupLevelByDate(long? shopId, DateTime startDate, DateTime endDate)
|
|
|
|
{
|
|
|
|
jdPopularizeReportFormAdGroupLevelSyncBusiness.SyncShopPopularizeReportFormAdGroupLevelByDate(shopId, startDate, endDate);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 同步全店推广报表-计划维度
|
|
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
|
|
public void SyncAllShopPopularizeReportFormCampaginLevel()
|
|
|
|
{
|
|
|
|
jdPopularizeReportFormCampaignLevelSyncBusiness.SyncAllShopPopularizeReportFormCampaignLevel();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 同步指定条件的推广报表-计划维度
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="shopId"></param>
|
|
|
|
/// <param name="startDate"></param>
|
|
|
|
/// <param name="endDate"></param>
|
|
|
|
[HttpGet]
|
|
|
|
public void SyncShopPopularizeReportFormCampaginLevelByDate(long? shopId, DateTime startDate, DateTime endDate)
|
|
|
|
{
|
|
|
|
jdPopularizeReportFormCampaignLevelSyncBusiness.SyncShopPopularizeReportFormCampaignLevelByDate(shopId, startDate, endDate);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 同步全店推广报表-订单维度
|
|
|
|
/// </summary>
|
|
|
|
[HttpGet]
|
|
|
|
public void SyncAllShopPopularizeReportFormOrderLevel()
|
|
|
|
{
|
|
|
|
jdPopularizeReportFormOrderLevelSyncBusiness.SyncAllShopPopularizeReportFormOrderLevel();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 同步指定条件的推广报表-订单维度
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="shopId"></param>
|
|
|
|
/// <param name="startDate"></param>
|
|
|
|
/// <param name="endDate"></param>
|
|
|
|
[HttpGet]
|
|
|
|
public void SyncShopPopularizeReportFormOrderLevelByDate(long? shopId, DateTime startDate, DateTime endDate)
|
|
|
|
{
|
|
|
|
jdPopularizeReportFormOrderLevelSyncBusiness.SyncShopPopularizeReportFormOrderLevelByDate(shopId, startDate, endDate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|