diff --git a/app/process/ExpiredRedis.php b/app/process/ExpiredRedis.php index 7519931..30d60da 100644 --- a/app/process/ExpiredRedis.php +++ b/app/process/ExpiredRedis.php @@ -30,7 +30,7 @@ class ExpiredRedis if (strpos($key, $str) === 0) { $id = str_replace($str, '', $key); // 发给队列 - Redis::send('send.mark.sms', '1,' . $id); + Redis::send('send.mark.sms', $id); Log::info ("处理营销短信过期: {$id}\n{}"); } // 微信模版 @@ -38,7 +38,7 @@ class ExpiredRedis if (strpos($key, $str) === 0) { $id = str_replace($str, '', $key); // 发给队列 - Redis::send('send.wechat.temp', '1,' . $id); + Redis::send('send.wechat.temp', $id); Log::info ("处理微信模版消息过期: {$id}\n{}"); } diff --git a/app/process/MessagePushTask.php b/app/process/MessagePushTask.php index 66958db..b4aac91 100644 --- a/app/process/MessagePushTask.php +++ b/app/process/MessagePushTask.php @@ -54,7 +54,7 @@ class MessagePushTask if($record) { foreach ($record as $key => $value) { $stortime = strtotime($value['send_time']); - $res = Redis::setEx('expired:sms:'.$value['id'], $stortime - time(), 1); + $res = Redis::setEx('expired:sms:'. $value['shop_id'] . ',' . $value['id'] . 'sendMarkSms', $stortime - time(), 1); Log::info('明日定时任务/营销短信--定时发送,已存入redis, ID-->' .$value['id'] . '/过期时间->>>' . $value['send_time'] . '/' . $stortime - time() . '保存结果' . $res); } } @@ -69,7 +69,7 @@ class MessagePushTask if($record) { foreach ($record as $key => $value) { $stortime = strtotime($value['send_time']); - $res = Redis::setEx('expired:wechat:'.$value['id'], $stortime - time(), 1); + $res = Redis::setEx('expired:wechat:'.$value['shop_id'] . ',' . $value['id'] . 'sendWechatTemp', $stortime - time(), 1); Log::info('明日定时任务/发送微信模版消息--定时发送,已存入redis, ID-->' .$value['id'] . '/过期时间->>>' . $value['send_time'] . '/' . $stortime - time() . '保存结果' . $res); } } diff --git a/app/queue/redis/SendMarkSms.php b/app/queue/redis/SendMarkSms.php index f69ea49..35dee7c 100644 --- a/app/queue/redis/SendMarkSms.php +++ b/app/queue/redis/SendMarkSms.php @@ -46,7 +46,7 @@ class SendMarkSms implements Consumer if($record['send_type'] == 2 && $record['send_time'] > date('Y-m-d H:i:s') && $record['send_time'] <= date('Y-m-d 23:59:59')) { // 推给redis $stortime = strtotime($record['send_time']); - $a = Redis::setEx('expired:sms:'.$record['id'], $stortime - time(), 1); + $a = Redis::setEx('expired:sms:'.$data, $stortime - time(), 1); Log::info(' 定时发送,已存入redis, 过期时间->>>' .$record['send_time'] . '/' . $stortime - time() . '保存结果' . $a); }else { // 待发送 diff --git a/app/queue/redis/SendWechatTemp.php b/app/queue/redis/SendWechatTemp.php index c853db6..2faba12 100644 --- a/app/queue/redis/SendWechatTemp.php +++ b/app/queue/redis/SendWechatTemp.php @@ -42,7 +42,7 @@ class SendWechatTemp implements Consumer if($record['send_type'] == 2 && $record['send_time'] > date('Y-m-d H:i:s') && $record['send_time'] <= date('Y-m-d 23:59:59')) { // 推给redis $stortime = strtotime($record['send_time']); - $a = Redis::setEx('expired:wechat:'.$record['id'], $stortime - time(), 1); + $a = Redis::setEx('expired:wechat:'.$data, $stortime - time(), 1); Log::info('发送微信模版消息定时发送,已存入redis, 过期时间->>>' .$record['send_time'] . '/' . $stortime - time() . '保存结果' . $a); }else { // 待发送