Browse Source

社媒对接

moshaorui 19 hours ago
parent
commit
e947f11e86

+ 1 - 0
app/Console/Commands/TimerSsmPost.php

@@ -74,6 +74,7 @@ class TimerSsmPost extends Command
                 //发送社媒帖子中
                 $log->status = 1;//发送中
                 $log->request_count = $log->request_count + 1;
+                $log->remark = '';
                 $log->updated_at = Carbon::now();
                 $log->save();
                 //发送社媒帖子中 end

+ 1 - 1
app/Distributor/Controllers/SmmPostLogController.php

@@ -43,7 +43,7 @@ class SmmPostLogController extends AdminController
                 2 => 'success',
                 3 => 'orange1',
             ])->display(function ($value) {
-                if ($this->status == 3 && $this->request_count <=1) {
+                if ($this->status == 3 && $this->request_count <=2) {
                     return "<span class='label' style='background:#3085d6'>".admin_trans_label('retrying').'</span>';
                 } else {
                     return $value;

+ 2 - 2
app/Distributor/Repositories/SmmPostLog.php

@@ -65,8 +65,8 @@ class SmmPostLog extends EloquentRepository
             return [];
         }
 
-        //找出待发送与发送失败的日志
-        $result = $log->wherein('status', [0,3])->where('request_count', '<=', 1)->where('send_time', '<', Carbon::now())->limit($limit)->get();
+        //找出待发送与发送失败的日志,重试2次
+        $result = $log->wherein('status', [0,3])->where('request_count', '<=', 2)->where('send_time', '<', Carbon::now())->limit($limit)->get();
         return $result;
     }