Ver código fonte

Merge commit 'd60b15efc4fca230a7a0c584a3fbcc5c752af56c' into dev

ith5 3 meses atrás
pai
commit
77e664a2f0

+ 4 - 4
app/command/CostGdt.php

@@ -20,10 +20,10 @@ class CostGdt extends Command
      */
     protected function configure()
     {
-        // 用法示例 php webman cost:gdt date pmid advertiser_ids
+        // 用法示例 php webman cost:gdt date bmid advertiser_ids
         // php webman cost:gdt 2025-07-30,2025-07-31 0 54970254,60853999
         $this->addArgument('date', InputArgument::OPTIONAL, '日期范围');
-        $this->addArgument('pmid', InputArgument::OPTIONAL, '需要拉取的API配置ID');
+        $this->addArgument('bmid', InputArgument::OPTIONAL, '需要拉取的API配置ID');
         $this->addArgument('advertiser_ids', InputArgument::OPTIONAL, '需要拉取的广告账户');
     }
 
@@ -35,7 +35,7 @@ class CostGdt extends Command
     protected function execute(InputInterface $input, OutputInterface $output): int
     {
         $date = $input->getArgument('date');
-        $pmid = (int)$input->getArgument('pmid');
+        $pmid = (int)$input->getArgument('bmid');
         $advertiserIds = $input->getArgument('advertiser_ids');
 
         $params = [];
@@ -45,7 +45,7 @@ class CostGdt extends Command
         }
 
         if($pmid){
-            $params['pmid'] = $pmid;
+            $params['bmid'] = $pmid;
         }
 
         if($advertiserIds){

+ 4 - 4
app/command/CostGdtVideo.php

@@ -20,10 +20,10 @@ class CostGdtVideo extends Command
      */
     protected function configure()
     {
-        // 用法示例 php webman cost:gdt_video date pmid advertiser_ids
+        // 用法示例 php webman cost:gdt_video date bmid advertiser_ids
         // php webman cost:gdt_video 2025-07-30,2025-07-31 0 54970254,60853999
         $this->addArgument('date', InputArgument::OPTIONAL, '日期范围');
-        $this->addArgument('pmid', InputArgument::OPTIONAL, '需要拉取的API配置ID');
+        $this->addArgument('bmid', InputArgument::OPTIONAL, '需要拉取的API配置ID');
         $this->addArgument('advertiser_ids', InputArgument::OPTIONAL, '需要拉取的广告账户');
     }
 
@@ -38,7 +38,7 @@ class CostGdtVideo extends Command
         $date = $input->getArgument('date');
         $date = $date ?: $ydate;
 
-        $pmid = (int)$input->getArgument('pmid');
+        $pmid = (int)$input->getArgument('bmid');
         $advertiserIds = $input->getArgument('advertiser_ids');
 
         $params = [];
@@ -48,7 +48,7 @@ class CostGdtVideo extends Command
         }
 
         if($pmid){
-            $params['pmid'] = $pmid;
+            $params['bmid'] = $pmid;
         }
 
         if($advertiserIds){

+ 4 - 4
app/command/CostToutiao.php

@@ -19,10 +19,10 @@ class CostToutiao extends Command
      */
     protected function configure()
     {
-        // 用法示例 php webman cost:tt date pmid advertiser_ids
+        // 用法示例 php webman cost:tt date bmid advertiser_ids
         // php webman cost:tt 2025-07-30,2025-07-31 0 54970254,60853999
         $this->addArgument('date', InputArgument::OPTIONAL, '日期范围');
-        $this->addArgument('pmid', InputArgument::OPTIONAL, '需要拉取的API配置ID');
+        $this->addArgument('bmid', InputArgument::OPTIONAL, '需要拉取的API配置ID');
         $this->addArgument('advertiser_ids', InputArgument::OPTIONAL, '需要拉取的广告账户');
     }
 
@@ -34,7 +34,7 @@ class CostToutiao extends Command
     protected function execute(InputInterface $input, OutputInterface $output): int
     {
         $date = $input->getArgument('date');
-        $pmid = (int)$input->getArgument('pmid');
+        $pmid = (int)$input->getArgument('bmid');
         $advertiserIds = $input->getArgument('advertiser_ids');
 
         $params = [];
@@ -44,7 +44,7 @@ class CostToutiao extends Command
         }
 
         if($pmid){
-            $params['pmid'] = $pmid;
+            $params['bmid'] = $pmid;
         }
 
         if($advertiserIds){

+ 4 - 4
app/command/CostToutiaoVideo.php

@@ -19,10 +19,10 @@ class CostToutiaoVideo extends Command
      */
     protected function configure()
     {
-        // 用法示例 php webman cost:tt_video date pmid advertiser_ids
+        // 用法示例 php webman cost:tt_video date bmid advertiser_ids
         // php webman cost:tt_video 2025-07-30,2025-07-31 0 54970254,60853999
         $this->addArgument('date', InputArgument::OPTIONAL, '日期范围');
-        $this->addArgument('pmid', InputArgument::OPTIONAL, '需要拉取的API配置ID');
+        $this->addArgument('bmid', InputArgument::OPTIONAL, '需要拉取的API配置ID');
         $this->addArgument('advertiser_ids', InputArgument::OPTIONAL, '需要拉取的广告账户');
     }
 
@@ -37,7 +37,7 @@ class CostToutiaoVideo extends Command
         $date = $input->getArgument('date');
         $date = $date ?: $ydate;
 
-        $pmid = (int)$input->getArgument('pmid');
+        $pmid = (int)$input->getArgument('bmid');
         $advertiserIds = $input->getArgument('advertiser_ids');
 
         $params = [];
@@ -47,7 +47,7 @@ class CostToutiaoVideo extends Command
         }
 
         if($pmid){
-            $params['pmid'] = $pmid;
+            $params['bmid'] = $pmid;
         }
 
         if($advertiserIds){

+ 1 - 1
app/v1/logic/advert/AgentSiteLogic.php

@@ -90,7 +90,7 @@ class AgentSiteLogic extends BaseLogic
 
         return Db::connect('db_advert')
             ->table('ad_advertiser_list')->alias('a')
-            ->join('ad_advertiser_pm b', 'a.pmid=b.id', 'left')
+            ->join('ad_advertiser_bm b', 'a.bmid=b.id', 'left')
             ->where($where)
             ->value('access_token');
     }

+ 1 - 1
app/v1/logic/customer/AccountLogic.php

@@ -85,7 +85,7 @@ class AccountLogic extends BaseLogic
         $page = request()->input('page', 1);
         $limit = request()->input('limit', 10);
         $orderBy = request()->input('orderBy', '');
-        $orderType = request()->input('orderType', $this->orderType);
+        $orderType = request()->input('orderType', 'desc');
         
         if(empty($orderBy)) {
             $orderBy = $this->orderField !== '' ? $this->orderField : $this->model->getPk();

+ 2 - 10
app/v1/logic/dataReport/UserLogLogic.php

@@ -20,7 +20,6 @@ class UserLogLogic extends BaseLogic
         $params = $this->searchByAuth($params);
         $limit = request()->input('limit', 10);
 
-        // 检查注册时间只能查询3个月内
         if (empty($params['reg_time']) || count($params['reg_time']) != 2) {
             throw new ApiException('请选择注册时间范围');
         }
@@ -32,7 +31,7 @@ class UserLogLogic extends BaseLogic
         // 计算时间差,限制为3个月(90天)内
         $maxDays = 90;
         if (($endTime - $startTime) > ($maxDays * 86400)) {
-            throw new ApiException('注册时间只能查询3个月内');
+            throw new ApiException('时间范围请勿超过90天');
         }
 
         // 公共处理完的where, 自然量ID, auth_id=0为自然量
@@ -53,8 +52,6 @@ class UserLogLogic extends BaseLogic
 
         $params = $this->searchByAuth($params);
 
-
-         // 检查注册时间只能查询3个月内
         if (empty($params['login_time']) || count($params['login_time']) != 2) {
             throw new ApiException('请选择登录时间范围');
         }
@@ -66,7 +63,7 @@ class UserLogLogic extends BaseLogic
         // 计算时间差,限制为3个月(90天)内
         $maxDays = 90;
         if (($endTime - $startTime) > ($maxDays * 86400)) {
-            throw new ApiException('登录时间只能查询3个月内');
+            throw new ApiException('时间范围请勿超过90天');
         }
 
         // 检查登录时间只能查询3个月内
@@ -76,11 +73,6 @@ class UserLogLogic extends BaseLogic
             if ($endTime < $startTime) {
                 throw new ApiException('注册时间范围不正确');
             }
-            // 计算时间差,限制为3个月(90天)内
-            $maxDays = 90;
-            if (($endTime - $startTime) > ($maxDays * 86400)) {
-                throw new ApiException('注册时间只能查询3个月内');
-            }
         }
 
          // 公共处理完的where, 自然量ID, auth_id=0为自然量

+ 6 - 6
app/v1/logic/tool/advertCost/BaseAdvertLogic.php

@@ -47,8 +47,8 @@ abstract class BaseAdvertLogic
         }
 
         // 重跑用,传int
-        if(!empty($params['pmid'])){
-            $this->pmid = $params['pmid'];
+        if(!empty($params['bmid'])){
+            $this->bmid = $params['bmid'];
         }
 
         $this->siteMap = (new AgentSiteLogic())->getSiteAuth();
@@ -116,7 +116,7 @@ abstract class BaseAdvertLogic
     protected function getAdvertiserMap($mediaId): array
     {
         $advertiserListTable = "ad_advertiser_list"; // 子账户列表
-        $advertiserPmTable = "ad_advertiser_pm"; // 管家户,包含token
+        $advertiserPmTable = "ad_advertiser_bm"; // 管家户,包含token
 
         $where = [
             "a.status" => 1,
@@ -128,13 +128,13 @@ abstract class BaseAdvertLogic
             $where['a.advertiser_id'] = $this->advertiserIds;
         }
 
-        if($this->pmid){
-            $where['a.pmid'] = $this->pmid;
+        if($this->bmid){
+            $where['a.bmid'] = $this->bmid;
         }
 
         $list = Db::connect('db_advert')
             ->table($advertiserListTable)->alias("a")
-            ->join("{$advertiserPmTable} b", "a.pmid=b.id")
+            ->join("{$advertiserPmTable} b", "a.bmid=b.id")
             ->field("a.*, b.access_token")
             ->where($where)->select()->toArray();