This commit is contained in:
2025-10-17 15:39:51 +08:00
parent 67d912fe49
commit 70be9f3275
5 changed files with 41 additions and 12 deletions

View File

@@ -39,7 +39,6 @@ class SendMarkSms implements Consumer
$sms_price = $sms_price[0];
}
if($data) {
Log::info('$data');
// 发送任务
// $record = Db::table('sms_push_event')->where(['id' => $sms_push_event_id, 'push_type' => 2])->find();
$record = Db::table('sms_push_event')->where(['id' => $sms_push_event_id])->find();
@@ -48,8 +47,8 @@ class SendMarkSms implements Consumer
if($record['send_type'] == 2 && $record['send_time'] > date('Y-m-d H:i:s')) {
// 推给redis
$stortime = strtotime($record['send_time']);
Redis::setEx('expired:sms:'.$record['id'], $stortime - time(), 1);
Log::info($record . ' 定时发送已存入redis, 过期时间->>>' .$record['send_time'] . '/' . $stortime - time());
$a = Redis::setEx('expired:sms:'.$record['id'], $stortime - time(), 1);
Log::info(' 定时发送已存入redis, 过期时间->>>' .$record['send_time'] . '/' . $stortime - time() . '保存结果' . $a);
}else {
// 待发送
if($record['status'] == 0) {
@@ -82,7 +81,7 @@ class SendMarkSms implements Consumer
if($shop_money) {
// 余额计算
if($shop_money['money'] > $sms_price) {
$templateParam = replace_json_keys($record['json'], $y_temp['content_json'], $v);
$templateParam = saveJson_arr($record['json'], $y_temp['reple_json'], $v);
$data = [
'templateCode' => $y_temp['template_code'],
'templateParam' => $templateParam,