作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

@@ -334,8 +334,9 @@ class RelayInquiry extends Command @@ -334,8 +334,9 @@ class RelayInquiry extends Command
334 foreach ($ad_task as $task){ 334 foreach ($ad_task as $task){
335 //需要多个ip访问的国家 随机2-5次访问,只有一次询盘 335 //需要多个ip访问的国家 随机2-5次访问,只有一次询盘
336 if (in_array($val->country_name, $this->multiple_ip_visit_country)) { 336 if (in_array($val->country_name, $this->multiple_ip_visit_country)) {
337 - $times = mt_rand([2, 5]); //随机次数  
338 - $inquiry_time = mt_rand([1, $times]); //第几次询盘 337 + $times = mt_rand(2, 5); //随机次数
  338 + $inquiry_time = mt_rand(1, $times); //第几次询盘
  339 + $this->output('多次访问模拟:' . $times);
339 for ($i = 1; $i <= $times; $i++) { 340 for ($i = 1; $i <= $times; $i++) {
340 $res += $this->relayDetail($task, $val, $inquiry_time == $i); 341 $res += $this->relayDetail($task, $val, $inquiry_time == $i);
341 } 342 }
@@ -167,9 +167,11 @@ class ProjectController extends BaseController @@ -167,9 +167,11 @@ class ProjectController extends BaseController
167 public function searchType(&$query){ 167 public function searchType(&$query){
168 if(isset($this->map['type'])){ 168 if(isset($this->map['type'])){
169 $query->where('gl_project.extend_type', '!=' ,5); 169 $query->where('gl_project.extend_type', '!=' ,5);
170 - if (in_array($this->map['type'], [Project::TYPE_ZERO, Project::TYPE_ONE, Project::TYPE_TWO, Project::TYPE_THREE])) 170 + if (in_array($this->map['type'], [Project::TYPE_ZERO, Project::TYPE_ONE, Project::TYPE_TWO, Project::TYPE_THREE])){
171 $query->where('gl_project.type', $this->map['type']); 171 $query->where('gl_project.type', $this->map['type']);
172 - else{ 172 + } elseif ($this->map['type'] == 8){
  173 + $query->where('gl_project.online_check_id', null)->where('gl_project.type',Project::TYPE_TWO);
  174 + }else{
173 $query->whereIn('gl_project.type', [Project::TYPE_FOUR,Project::TYPE_SIX]); 175 $query->whereIn('gl_project.type', [Project::TYPE_FOUR,Project::TYPE_SIX]);
174 } 176 }
175 } 177 }
@@ -68,6 +68,9 @@ class AyrReleaseController extends BaseController @@ -68,6 +68,9 @@ class AyrReleaseController extends BaseController
68 if(isset($this->param['images']) && !empty($this->param['images'])){ 68 if(isset($this->param['images']) && !empty($this->param['images'])){
69 $data['images'] = $this->param['images']; 69 $data['images'] = $this->param['images'];
70 } 70 }
  71 + if(empty($data)){
  72 + $this->fail('媒体信息不能为空');
  73 + }
71 //参数处理 74 //参数处理
72 $this->param['mediaUrls'] = $ayrReleaseLogic->image_file_param($data); 75 $this->param['mediaUrls'] = $ayrReleaseLogic->image_file_param($data);
73 $param = [ 76 $param = [
@@ -41,7 +41,7 @@ class OperationHeartbeatController extends BaseController @@ -41,7 +41,7 @@ class OperationHeartbeatController extends BaseController
41 'is_custom.required' => '是否为扩展模版', 41 'is_custom.required' => '是否为扩展模版',
42 'is_template.required' => '详情页/可视化', 42 'is_template.required' => '详情页/可视化',
43 ]); 43 ]);
44 - if(empty($this->param['source_id'])){ 44 + if(empty($this->param['source_id']) || ($this->param['source_id'] == 'NaN')){
45 $this->response('success'); 45 $this->response('success');
46 } 46 }
47 $condition = ['project_id'=>$this->user['project_id'],'source'=>$this->param['source'],'source_id'=>$this->param['source_id'], 47 $condition = ['project_id'=>$this->user['project_id'],'source'=>$this->param['source'],'source_id'=>$this->param['source_id'],