作者 lyh

Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into lyh-server

@@ -997,13 +997,13 @@ class RelayInquiry extends Command @@ -997,13 +997,13 @@ class RelayInquiry extends Command
997 $res = $this->get_rand([$task->second_push_rate, 100 - $task->second_push_rate]); 997 $res = $this->get_rand([$task->second_push_rate, 100 - $task->second_push_rate]);
998 if($res == 1){ 998 if($res == 1){
999 //随机分配到未投放广告日期 999 //随机分配到未投放广告日期
1000 - $now = Carbon::now(); 1000 + $now = time();
1001 // 随机开始时间(本周四或现在) 1001 // 随机开始时间(本周四或现在)
1002 - $startTime = max($now->timestamp, $now->startOfWeek(4)->timestamp); 1002 + $startTime = max($now, strtotime('this thursday'));
1003 1003
1004 - $random = mt_rand($startTime, $now->endOfWeek()->timestamp); 1004 + $random = mt_rand($startTime, strtotime('next monday'));
1005 1005
1006 - $delay = $random - time(); 1006 + $delay = $random - $now;
1007 $this->output('非广告投放日第一封询盘 概率' . (100 - $task->second_push_rate) . '%延迟推送' . $delay); 1007 $this->output('非广告投放日第一封询盘 概率' . (100 - $task->second_push_rate) . '%延迟推送' . $delay);
1008 return $delay; 1008 return $delay;
1009 } 1009 }
@@ -145,6 +145,7 @@ class SyncInquiryProject extends Command @@ -145,6 +145,7 @@ class SyncInquiryProject extends Command
145 ->leftJoin('gl_project_deploy_optimize', 'gl_project.id', '=', 'gl_project_deploy_optimize.project_id') 145 ->leftJoin('gl_project_deploy_optimize', 'gl_project.id', '=', 'gl_project_deploy_optimize.project_id')
146 ->where('gl_project.type', Project::TYPE_TWO) 146 ->where('gl_project.type', Project::TYPE_TWO)
147 ->where('gl_project.extend_type', '!=', 5) 147 ->where('gl_project.extend_type', '!=', 5)
  148 + ->where('gl_project.delete_status', Project::IS_DEL_FALSE)
148 ->where(function ($query) { 149 ->where(function ($query) {
149 $query->orwhere('gl_project_online_check.qa_status', OnlineCheck::STATUS_ONLINE_TRUE) 150 $query->orwhere('gl_project_online_check.qa_status', OnlineCheck::STATUS_ONLINE_TRUE)
150 ->orwhere('gl_project.is_upgrade', Project::IS_UPGRADE_TRUE); 151 ->orwhere('gl_project.is_upgrade', Project::IS_UPGRADE_TRUE);