作者 刘锟

update

... ... @@ -231,8 +231,11 @@ class SyncProject extends Command
$this->createUser($data['project']['mobile'],$id,$data['project']['lead_name']);
//新增数据抓取任务
$task_list = [];
if(!in_array('category_news',$param['api_type'])){
array_push($param['api_type'],'category_news');
}
foreach ($param['api_type'] as $v_type){
if($v_type == 'category'){
if($v_type == 'category' || $v_type == 'category_news'){
UpdateLog::createLog($id,$v_type,$param['get_data_url']);
}else{
$task_list[] = $v_type;
... ...
... ... @@ -33,8 +33,8 @@ class UpdateLog extends Model
$log->project_id = $project_id;
$log->api_type = $type;
$log->api_url = $url;
$log->sort = $type == 'category' ? 0 : 1;
$log->collect_status = ($type == 'category' || $type == 'website_info' || $type == 'tag') ? 1 : 0;
$log->sort = ($type == 'category' || $type == 'category_news') ? 0 : 1;
$log->collect_status = ($type == 'category' || $type == 'category_news' || $type == 'website_info' || $type == 'tag') ? 1 : 0;
return $log->save();
}
return true;
... ...