进一步完成

This commit is contained in:
2025-10-15 19:41:26 +08:00
parent 348a990f88
commit d715a5fcf0
5 changed files with 11 additions and 5 deletions

View File

@@ -23,15 +23,18 @@ class BirthdayGiftSms implements Consumer
// 待发送
if($record['push_status'] == 'wait_push') {
$user = Db::table('tb_shop_user')->where(['id' => $record['user_id']])->find();
// 张松 需要加主模版ID
$y_temp = Db::table('sms_shop_template')->where(['id' => $record['push_event_id']])->find();
if($user && !empty($user['phone'])) {
// 检测余额
$shop_money = Db::table('sms_shop_money')->where(['shop_id' => $record['main_shop_id']])->find();
if($shop_money) {
// 余额计算
if($shop_money['money'] > config('cons.sms_price')) {
$templateParam = replace_json_keys($record['template_content'], $y_temp['content_json'], $user);
$data = [
'templateCode' => $record['template_code'],
'templateParam' => $record['template_content'],
'templateParam' => $templateParam,
'phoneNumbers' => $user['phone'],
'signName' => config('cons.sms_sign'),
];

View File

@@ -48,7 +48,7 @@ class SendMarkSms implements Consumer
if($shop_money['money'] > config('cons.sms_price')) {
$templateParam = replace_json_keys($record['json'], $y_temp['content_json']);
$data = [
'templateCode' => $record['template_code'],
'templateCode' => $y_temp['template_code'],
'templateParam' => $templateParam,
'phoneNumbers' => $user_list['phone'],
'signName' => config('cons.sms_sign'),