作者 赵彬吉

update

@@ -45,7 +45,7 @@ class postInquiry extends Command @@ -45,7 +45,7 @@ class postInquiry extends Command
45 public function handle() 45 public function handle()
46 { 46 {
47 while (true) { 47 while (true) {
48 - $list = ReInquiryDetailLog::where('status', ReInquiryDetailLog::STATUS_INIT)->where('start_at', '<=', date('Y-m-d H:i:s'))->limit(100)->get(); 48 + $list = ReInquiryDetailLog::where('status', ReInquiryDetailLog::STATUS_INIT)->where('start_at', '<=', date('Y-m-d H:i:s'))->orderBy('id', 'asc')->limit(100)->get();
49 if (!$list->count()){ 49 if (!$list->count()){
50 sleep(1); 50 sleep(1);
51 } 51 }
@@ -75,7 +75,7 @@ class postInquiry extends Command @@ -75,7 +75,7 @@ class postInquiry extends Command
75 if($last_log->status == ReInquiryDetailLog::STATUS_INIT){ 75 if($last_log->status == ReInquiryDetailLog::STATUS_INIT){
76 continue; 76 continue;
77 } 77 }
78 - //上一个处理完成 直接跳过 78 + //上一个处理完成
79 if($last_log->status == ReInquiryDetailLog::STATUS_SUCCESS){ 79 if($last_log->status == ReInquiryDetailLog::STATUS_SUCCESS){
80 //上次处理时间间隔达到没 80 //上次处理时间间隔达到没
81 $interval = strtotime($val->start_at) - strtotime($last_log->start_at); 81 $interval = strtotime($val->start_at) - strtotime($last_log->start_at);