|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
|
|
namespace app\command;
|
|
namespace app\command;
|
|
|
|
|
|
|
|
-use app\v1\logic\tool\advertCost\TtCostHourLogic;
|
|
|
|
|
|
|
+use app\v1\logic\tool\advertCost\ToutiaoCostHourLogic;
|
|
|
use Symfony\Component\Console\Command\Command;
|
|
use Symfony\Component\Console\Command\Command;
|
|
|
use Symfony\Component\Console\Attribute\AsCommand;
|
|
use Symfony\Component\Console\Attribute\AsCommand;
|
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
@@ -11,7 +11,7 @@ use Symfony\Component\Console\Input\InputArgument;
|
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
|
|
|
|
#[AsCommand('cost:tt', 'cost tt')]
|
|
#[AsCommand('cost:tt', 'cost tt')]
|
|
|
-class CostTt extends Command
|
|
|
|
|
|
|
+class CostToutiao extends Command
|
|
|
{
|
|
{
|
|
|
/**
|
|
/**
|
|
|
* 自定义脚本示例
|
|
* 自定义脚本示例
|
|
@@ -19,10 +19,10 @@ class CostTt extends Command
|
|
|
*/
|
|
*/
|
|
|
protected function configure()
|
|
protected function configure()
|
|
|
{
|
|
{
|
|
|
- // 用法示例 php webman cost:tt date api_id advertiser_ids
|
|
|
|
|
|
|
+ // 用法示例 php webman cost:tt date pmid advertiser_ids
|
|
|
// php webman cost:tt 2025-07-30,2025-07-31 0 54970254,60853999
|
|
// php webman cost:tt 2025-07-30,2025-07-31 0 54970254,60853999
|
|
|
$this->addArgument('date', InputArgument::OPTIONAL, '日期范围');
|
|
$this->addArgument('date', InputArgument::OPTIONAL, '日期范围');
|
|
|
- $this->addArgument('api_id', InputArgument::OPTIONAL, '需要拉取的API配置ID');
|
|
|
|
|
|
|
+ $this->addArgument('pmid', InputArgument::OPTIONAL, '需要拉取的API配置ID');
|
|
|
$this->addArgument('advertiser_ids', InputArgument::OPTIONAL, '需要拉取的广告账户');
|
|
$this->addArgument('advertiser_ids', InputArgument::OPTIONAL, '需要拉取的广告账户');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -34,7 +34,7 @@ class CostTt extends Command
|
|
|
protected function execute(InputInterface $input, OutputInterface $output): int
|
|
protected function execute(InputInterface $input, OutputInterface $output): int
|
|
|
{
|
|
{
|
|
|
$date = $input->getArgument('date');
|
|
$date = $input->getArgument('date');
|
|
|
- $apiId = (int)$input->getArgument('api_id');
|
|
|
|
|
|
|
+ $pmid = (int)$input->getArgument('pmid');
|
|
|
$advertiserIds = $input->getArgument('advertiser_ids');
|
|
$advertiserIds = $input->getArgument('advertiser_ids');
|
|
|
|
|
|
|
|
$params = [];
|
|
$params = [];
|
|
@@ -43,8 +43,8 @@ class CostTt extends Command
|
|
|
$params['date'] = explode(',', $date);
|
|
$params['date'] = explode(',', $date);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if($apiId){
|
|
|
|
|
- $params['api_id'] = $apiId;
|
|
|
|
|
|
|
+ if($pmid){
|
|
|
|
|
+ $params['pmid'] = $pmid;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if($advertiserIds){
|
|
if($advertiserIds){
|
|
@@ -53,7 +53,7 @@ class CostTt extends Command
|
|
|
|
|
|
|
|
$output->writeln("\ntt cost sta:" . json_encode($params, JSON_UNESCAPED_UNICODE));
|
|
$output->writeln("\ntt cost sta:" . json_encode($params, JSON_UNESCAPED_UNICODE));
|
|
|
|
|
|
|
|
- $res = (new TtCostHourLogic)->run($params);
|
|
|
|
|
|
|
+ $res = (new ToutiaoCostHourLogic)->run($params);
|
|
|
|
|
|
|
|
$output->writeln("\ntt cost end:" . $res);
|
|
$output->writeln("\ntt cost end:" . $res);
|
|
|
|
|
|