Browse Source

计划任务重写

lizhen_gitee 10 months ago
parent
commit
0bbd6ec72f
1 changed files with 4 additions and 6 deletions
  1. 4 6
      application/index/controller/Plantask.php

+ 4 - 6
application/index/controller/Plantask.php

@@ -121,7 +121,6 @@ class Plantask extends Controller
             try {
                 $obj = new Email();
                 foreach($order_list as $order){
-
                     $result = $obj
                         ->to($order['email'])
                         ->subject('Class is Cancelled!')
@@ -181,8 +180,8 @@ class Plantask extends Controller
                 //给这些用户发邮件
                 $result = $obj
                     ->to($order['email'])
-                    ->subject('Elin Dance Studio 套餐一个月内到期提醒!')
-                    ->message('Hi,'.$order['firstname']. ' ' .$order['lastname'].',您购买的套餐['.$order['name'].']将于'.date('Y-m-d H:i:s',$order['endtime']).'过期,建议您在过期内使用完毕!')
+                    ->subject('Elin Dance Studio 您购买的套餐已到账')
+                    ->message('Hi,'.$order['firstname']. ' ' .$order['lastname'].',您购买的套餐['.$order['name'].']即日起生效!')
                     ->send();
 
             } catch (Exception $e) {
@@ -191,7 +190,7 @@ class Plantask extends Controller
 
             //任务完成
             $update = [
-                'notice_status' => 1,//月通知已发送
+                'buy_notice_status' => 1,
             ];
             Db::name('package_order')->where('id',$order['id'])->update($update);
         }
@@ -266,12 +265,12 @@ class Plantask extends Controller
 
             try {
                 //给这些用户发邮件
-
                 $result = $obj
                     ->to($order['email'])
                     ->subject('Elin Dance Studio 套餐两周内到期提醒!')
                     ->message('Hi,'.$order['firstname']. ' ' .$order['lastname'].',您购买的套餐['.$order['name'].']将于'.date('Y-m-d H:i:s',$order['endtime']).'过期,建议您在过期内使用完毕!')
                     ->send();
+
             } catch (Exception $e) {
 
             }
@@ -303,7 +302,6 @@ class Plantask extends Controller
         }
         $obj = new Email();
         foreach($task_list as $order){
-
             try {
                 //给这些用户发邮件
                 $result = $obj