This commit is contained in:
2025-10-17 10:22:02 +08:00
parent 1a1040b514
commit 7e93bee4fa
11 changed files with 64 additions and 652 deletions

View File

@@ -31,6 +31,13 @@ class SendMarkSms implements Consumer
Log::info('send.mark.sms数据格式错误');
return false;
}
$sms_price = Db::table('sys_params')->where(['param_code' => 'sms_fee'])->column('param_value');
if(!$sms_price) {
Log::info('短信价格未定,停止发送');
return false;
}else {
$sms_price = $sms_price[0];
}
if($data) {
Log::info('$data');
// 发送任务
@@ -74,7 +81,7 @@ class SendMarkSms implements Consumer
$shop_money = Db::table('sms_shop_money')->where(['shop_id' => $record['shop_id']])->find();
if($shop_money) {
// 余额计算
if($shop_money['money'] > config('cons.sms_price')) {
if($shop_money['money'] > $sms_price) {
$templateParam = replace_json_keys($record['json'], $y_temp['content_json'], $v);
$data = [
'templateCode' => $y_temp['template_code'],