|
@@ -46,6 +46,8 @@ class TimerSsmPost extends Command
|
|
Log::info('开始刷新access_token');
|
|
Log::info('开始刷新access_token');
|
|
$this->refreshAccessToken();
|
|
$this->refreshAccessToken();
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
//发送社媒帖子开始
|
|
//发送社媒帖子开始
|
|
Log::info('开始发送社媒帖子');
|
|
Log::info('开始发送社媒帖子');
|
|
$sendLog = SmmPostLog::getSendLog(5);
|
|
$sendLog = SmmPostLog::getSendLog(5);
|
|
@@ -158,10 +160,10 @@ class TimerSsmPost extends Command
|
|
$accountIds = explode(',', $post->account_ids);
|
|
$accountIds = explode(',', $post->account_ids);
|
|
$accounts = SmmUserAccount::getAccountsByIds($accountIds);
|
|
$accounts = SmmUserAccount::getAccountsByIds($accountIds);
|
|
foreach ($accounts as $account) {
|
|
foreach ($accounts as $account) {
|
|
- $send_time = $post->send_time;
|
|
|
|
|
|
+ $send_time = Carbon::now();
|
|
// 如果是Twitter,15分钟内只能发一个帖
|
|
// 如果是Twitter,15分钟内只能发一个帖
|
|
if ($account->getParent->name == 'Twitter') {
|
|
if ($account->getParent->name == 'Twitter') {
|
|
- $send_time = SmmPostLog::getTwitterSendTime($send_time);
|
|
|
|
|
|
+ $send_time = SmmPostLog::getTwitterSendTime();
|
|
}
|
|
}
|
|
//生成post_logs表数据
|
|
//生成post_logs表数据
|
|
$data = [
|
|
$data = [
|