作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !130
@@ -231,8 +231,11 @@ class SyncProject extends Command @@ -231,8 +231,11 @@ class SyncProject extends Command
231 $this->createUser($data['project']['mobile'],$id,$data['project']['lead_name']); 231 $this->createUser($data['project']['mobile'],$id,$data['project']['lead_name']);
232 //新增数据抓取任务 232 //新增数据抓取任务
233 $task_list = []; 233 $task_list = [];
  234 + if(!in_array('category_news',$param['api_type'])){
  235 + array_push($param['api_type'],'category_news');
  236 + }
234 foreach ($param['api_type'] as $v_type){ 237 foreach ($param['api_type'] as $v_type){
235 - if($v_type == 'category'){ 238 + if($v_type == 'category' || $v_type == 'category_news'){
236 UpdateLog::createLog($id,$v_type,$param['get_data_url']); 239 UpdateLog::createLog($id,$v_type,$param['get_data_url']);
237 }else{ 240 }else{
238 $task_list[] = $v_type; 241 $task_list[] = $v_type;
@@ -33,8 +33,8 @@ class UpdateLog extends Model @@ -33,8 +33,8 @@ class UpdateLog extends Model
33 $log->project_id = $project_id; 33 $log->project_id = $project_id;
34 $log->api_type = $type; 34 $log->api_type = $type;
35 $log->api_url = $url; 35 $log->api_url = $url;
36 - $log->sort = $type == 'category' ? 0 : 1;  
37 - $log->collect_status = ($type == 'category' || $type == 'website_info' || $type == 'tag') ? 1 : 0; 36 + $log->sort = ($type == 'category' || $type == 'category_news') ? 0 : 1;
  37 + $log->collect_status = ($type == 'category' || $type == 'category_news' || $type == 'website_info' || $type == 'tag') ? 1 : 0;
38 return $log->save(); 38 return $log->save();
39 } 39 }
40 return true; 40 return true;