Skip to content

Commit cdf6782

Browse files
committed
fix 修改连表条件
1 parent 1ea5cbf commit cdf6782

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

laravel/app/Http/Repository/ApiRepository.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@ public function autoFailed()
7878
// 2. 完成率 50% -- 1 分钟不再增加
7979
// 3. 完成率 10% -- 5 分钟不再增加
8080
// 4. 完成率 1% -- 10 分钟不再增加
81-
$excels = DB::connection()->select('SELECT ae.id,ae.api_param_id,ae.state,ae.total_excel,ael.api_excel_id,ael.sort_index,ael.created_at FROM `boss_api_excel` ae LEFT JOIN boss_api_excel_logs ael ON ae.id=ael.api_excel_id AND ael.id=(SELECT c.id FROM boss_api_excel_logs c WHERE ael.api_excel_id=c.api_excel_id ORDER BY sort_index DESC LIMIT 1)
82-
WHERE ae.state=1 AND ae.`deleted_at` IS NULL ');
81+
$excels = DB::connection()->select('SELECT ae.id,ae.api_param_id,ae.state,ae.total_excel,ael.api_excel_id,ael.sort_index,ael.created_at FROM `boss_api_excel` ae LEFT JOIN boss_api_excel_logs ael ON ae.id=ael.api_excel_id AND ael.id=(SELECT id FROM boss_api_excel_logs WHERE boss_api_excel_logs.api_excel_id=ae.id ORDER BY sort_index DESC LIMIT 1) WHERE ae.state=1 AND ae.`deleted_at` IS NULL ');
8382

8483
foreach ($excels as $excel) {
8584
// 开启任务后 10 分钟未查询出结果=》失败

0 commit comments

Comments
 (0)