|
@@ -0,0 +1,54 @@
|
|
|
+<?php
|
|
|
+/**
|
|
|
+ * Created by PhpStorm.
|
|
|
+ * User: z-yang
|
|
|
+ * Date: 2020/12/24
|
|
|
+ * Time: 16:47
|
|
|
+ */
|
|
|
+
|
|
|
+namespace App\Console\Commands\Channel;
|
|
|
+
|
|
|
+use Illuminate\Console\Command;
|
|
|
+use DB;
|
|
|
+
|
|
|
+class ReportUserAndOrderToChannel extends Command
|
|
|
+{
|
|
|
+ /**
|
|
|
+ * 执行命令 php artisan generate_order_day_stat
|
|
|
+ *
|
|
|
+ * The name and signature of the console command.
|
|
|
+ *
|
|
|
+ * @var string
|
|
|
+ */
|
|
|
+ protected $signature = 'channel:ReportUserAndOrderToChannel {--type=}';
|
|
|
+
|
|
|
+ /**
|
|
|
+ * The console command description.
|
|
|
+ *
|
|
|
+ * @var string
|
|
|
+ */
|
|
|
+ protected $description = '检测渠道账号状态';
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Execute the console command.
|
|
|
+ *
|
|
|
+ * @return mixed
|
|
|
+ */
|
|
|
+ public function handle(){
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private function reportOrders(){
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private function reportUsers($date){
|
|
|
+ $result = DB::table('report_to_channel_users')->where('created_at','>=',$date)
|
|
|
+ ->where('report_status',0)
|
|
|
+ ->select('id','uid','distribution_channel_id','register_ip','user_agent','user_created_at')->get();
|
|
|
+ if(!$result)return ;
|
|
|
+ foreach ($result as $item){
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|