|
...
|
...
|
@@ -6,7 +6,6 @@ use App\Helper\Common; |
|
|
|
use App\Helper\FormGlobalsoApi;
|
|
|
|
use App\Models\CustomerVisit\CustomerVisitItem;
|
|
|
|
use App\Models\Project\DeployBuild;
|
|
|
|
use App\Models\Project\DeployOptimize;
|
|
|
|
use Carbon\Carbon;
|
|
|
|
use Illuminate\Console\Command;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
...
|
...
|
@@ -36,15 +35,15 @@ class Yesterday extends Command |
|
|
|
*/
|
|
|
|
public function handle()
|
|
|
|
{
|
|
|
|
$deployModel = new DeployOptimize();
|
|
|
|
$deployModel = new DeployBuild();
|
|
|
|
$list = $deployModel->list();
|
|
|
|
$data = [];
|
|
|
|
$yesterday = Carbon::yesterday()->toDateString();
|
|
|
|
foreach ($list as $v){
|
|
|
|
$arr = [];
|
|
|
|
$arr['pv_num'] = DB::table('gl_customer_visit_item')->whereDate('updated_date', $yesterday)->where('domain',$v['domain'])->count();
|
|
|
|
$arr['ip_num'] = DB::table('gl_customer_visit')->whereDate('updated_date', $yesterday)->where('domain',$v['domain'])->count();
|
|
|
|
$inquiry_list = (new FormGlobalsoApi())->getInquiryList($v['domain']);
|
|
|
|
$arr['pv_num'] = DB::table('gl_customer_visit_item')->whereDate('updated_date', $yesterday)->where('domain',$v['test_domain'])->count();
|
|
|
|
$arr['ip_num'] = DB::table('gl_customer_visit')->whereDate('updated_date', $yesterday)->where('domain',$v['test_domain'])->count();
|
|
|
|
$inquiry_list = (new FormGlobalsoApi())->getInquiryList($v['test_domain']);
|
|
|
|
if($inquiry_list['status'] == self::STATUS_ERROR){
|
|
|
|
$arr['inquiry_num'] = 0;
|
|
|
|
}else{
|
...
|
...
|
|