作者 lyh
... ... @@ -478,7 +478,7 @@ class ProjectUpdate extends Command
return $task_id;
}
$task_list = UpdateLog::where('project_id', 528)->where('status', UpdateLog::STATUS_UN)->orderBy('project_id', 'asc')->orderBy('sort', 'asc')->limit(8)->get();
$task_list = UpdateLog::where('project_id', 543)->where('status', UpdateLog::STATUS_UN)->orderBy('project_id', 'asc')->orderBy('sort', 'asc')->limit(8)->get();
if ($task_list->count() == 0) {
return false;
}
... ... @@ -506,7 +506,7 @@ class ProjectUpdate extends Command
$path_arr = explode('/', $path);
return end($path_arr) ? generateRoute(end($path_arr)) : generateRoute($path_arr[count($path_arr) - 2]);
return end($path_arr) ? end($path_arr) : $path_arr[count($path_arr) - 2];
}
//产品多级分类入库
... ...
... ... @@ -151,7 +151,7 @@ class NavLogic extends BaseLogic
if($pid){
$p_cate = $category->where('id', $pid)->select($fields)->first();
if($p_cate){
$nav_pid = $this->model->where('import_id', $nav['id'])->where('url', $p_cate['alias'])->value('id');
$nav_pid = $this->model->where('import_id', $nav['id'])->where('url', $p_cate['alias'])->value('id') ?: $nav_pid;
}
}
$list = $category->list(['pid' => $pid], 'id', $fields, 'asc');
... ... @@ -166,7 +166,7 @@ class NavLogic extends BaseLogic
continue;
}
$data[] = [
'pid' => $nav_pid ?: 0,
'pid' => $nav_pid,
'name' => $item['name'],
'url' => $item['alias'],
'project_id' => $this->project['id'],
... ...