|
...
|
...
|
@@ -53,15 +53,20 @@ class ProjectFilePDF extends Command |
|
|
|
parent::__construct();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function handle()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public function start(): int
|
|
|
|
{
|
|
|
|
$status = 1; # 1 - 正常, 0 - 禁用
|
|
|
|
$is_pdf = 0; # 0 - 未生成 1 - 已生成 2 - 其它问题
|
|
|
|
$status = 0; # 0 - 未生成 1 - 已生成 2 - 其它问题
|
|
|
|
$lists = $this->DataFile::query()->where('status', $status)
|
|
|
|
->where('project_id', '!=', 0)
|
|
|
|
->where('friend_id', '!=', 0)
|
|
|
|
->where('user_id', '!=', 0)
|
|
|
|
->where('is_pdf', $is_pdf)->where('created_at', 'like', $this->time . '%')->first();
|
|
|
|
->where('created_at', 'like', $this->time . '%')->first();
|
|
|
|
if (is_null($lists)) {
|
|
|
|
$this->debug_echo('没有任务,等待中');
|
|
|
|
sleep(60);
|
|
...
|
...
|
@@ -69,10 +74,9 @@ class ProjectFilePDF extends Command |
|
|
|
}
|
|
|
|
$key = $this->signature . '-' . $lists->id;
|
|
|
|
$count = redis_get($key);
|
|
|
|
$item = $lists->getOriginal();
|
|
|
|
$project_id = $item->project_id;
|
|
|
|
$user_id = $item->user_id;
|
|
|
|
$friend_id = $item->friend_id;
|
|
|
|
$project_id = $lists->project_id;
|
|
|
|
$user_id = $lists->user_id;
|
|
|
|
$friend_id = $lists->friend_id;
|
|
|
|
// todo 根据项目查询数据
|
|
|
|
$project_data = [];
|
|
|
|
$html = $this->html($project_data);
|
...
|
...
|
|