Преглед изворни кода

【Mod】消息通知优化

liuxiangxin пре 4 месеци
родитељ
комит
967bfc99d3

+ 1 - 1
app/Console/Commands/CouponNotice.php

@@ -62,7 +62,7 @@ class CouponNotice extends Command
         // 组合数据
         $phoneList          = implode(',',$phoneList);
         // 给这些手机号发送一条阿里云短信
-        $result             = Sms::sendSms($phoneList,'开邻智数','SMS_478125029');
+        $result             = $phoneList ? Sms::sendSms($phoneList,'开邻智数','SMS_478125029') : [];
         // 返回结果
         return              $result;
 	}

+ 1 - 1
app/Console/Commands/OrdersNotice.php

@@ -63,7 +63,7 @@ class OrdersNotice extends Command
         // 组合数据
         $phoneList          = implode(',',$phoneList);
         // 给这些手机号发送一条阿里云短信
-        $result             = Sms::sendSms($phoneList,'开邻智数','SMS_478160083');
+        $result             = $phoneList ? Sms::sendSms($phoneList,'开邻智数','SMS_478160083') : [];
         // 返回结果
         return              $result;
 	}

+ 2 - 0
app/Console/Kernel.php

@@ -36,6 +36,8 @@ class Kernel extends ConsoleKernel
         $schedule->command('regiment')->everyMinute();
         // 优惠券提醒
         $schedule->command('coupon_notice')->dailyAt('15:00');
+        // 优惠券提醒
+        $schedule->command('orders_notice')->dailyAt('07:00');
     }
 
     /**

+ 0 - 1
app/Servers/Aliyun/Sms.php

@@ -39,7 +39,6 @@ class Sms extends Client{
             $result         = $response['body'];
             // 如果失败的话
             if( $result['Code'] != 'OK' )   return ['code'=>$result['Code'],'error'=>$result['Message'],'request_id'=>$result['RequestId']];
-            dd($result);
             // 返回成功信息
             return          ['code'=>$result['Code'],'message'=>$result['Message'],'requestId'=>$result['RequestId'],'bizId'=>$result['BizId']];
         }catch (\Exception $error) {