xxxrrrdddd 3 年之前
父节点
当前提交
a0e72c6e17
共有 3 个文件被更改,包括 18 次插入1 次删除
  1. 12 0
      addons/aliyunsms/config.php
  2. 4 0
      application/common/service/SmsSend.php
  3. 2 1
      commands/mobile_order_unpay_notify.php

+ 12 - 0
addons/aliyunsms/config.php

@@ -121,4 +121,16 @@ return [
         'ok' => '',
         'extend' => '',
     ],
+    [
+        'name' => 'temp_unpay',
+        'title' => '未支付通知模板',
+        'type' => 'string',
+        'content' => [],
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '未支付通知模板',
+        'ok' => '',
+        'extend' => '',
+    ],
 ];

+ 4 - 0
application/common/service/SmsSend.php

@@ -53,6 +53,10 @@ class SmsSend{
             'expressno'=>$transNo
         ]);
     }
+    public static function orderUnPay($mobile,$no){
+        return Sms::send($mobile,null,'temp_unpay','temp_unpay',[
+        ]);
+    }
     public static function orderSubmit($mobile){
         return Sms::send($mobile,null,'temp_submit_order','temp_submit_order');
     }

+ 2 - 1
commands/mobile_order_unpay_notify.php

@@ -1,5 +1,6 @@
 <?php
 use app\common\model\MobileOrder;
+use app\common\service\SmsSend;
 use think\Db;
 use think\Log;
 use Workerman\Worker as WO;
@@ -23,7 +24,7 @@ class MobileOrderUnPayNotify{
                     if(!$order){
                         continue;
                     }
-
+                    SmsSend::orderUnPay($order['phone'],$order['no']);
                 }
                 sleep(1);
             }