소스 검색

社媒对接

moshaorui 23 시간 전
부모
커밋
9beaae19d0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/Distributor/Repositories/SmmPostLog.php

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

@@ -144,7 +144,7 @@ class SmmPostLog extends EloquentRepository
     {
         $log = new Model();
         //查找最后一条发送记录
-        $lastSendLog = $log->wherein('status', [2,3])->where('media_name', 'Twitter')->orderByDesc('id')->first();
+        $lastSendLog = $log->wherein('status', [2,3])->where('media_name', 'Twitter')->orderByDesc('send_time')->first();
         //如果时间间隔小于15分钟,则不允许发送
         if ($lastSendLog) {
             $lastSendTime = Carbon::parse($lastSendLog->send_time);