Explorar o código

小程序发模板消息,订单

lizhen hai 2 días
pai
achega
810afad57a
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      application/index/controller/Plantask.php

+ 3 - 2
application/index/controller/Plantask.php

@@ -11,14 +11,15 @@ class Plantask extends Controller
     //当已付款的活动预约订单,还有一天就要开始的时候,给他发个消息,提醒他不要忘记了
     public function auto_order_sendmsg(){
 
-        $todayend = strtotime(date('Y-m-d')) + 86399 ;
+        $start = strtotime(date('Y-m-d')) + 86400 ;
+        $ended = $start + 86399 ;
         $where = [
             'order.notice_status' => 0, //通知状态:0=未通知,1=已通知
             'order.status' => 1,  //订单状态:-1=退货,0=取消订单,1=正常
             'order.have_paid' => ['gt',0], //已支付
             'order.have_received' => 0,  //未核销
             'order.refund_status' => 0, //未退款
-            'product.activetime' => ['gt',$todayend],
+            'product.activetime' => ['between',[$start,$ended]],
         ];
         $list = Db::name('unishop_order')->alias('order')
             ->field('order.id,product.title,product.info,product.activetime,user.wxmini_openid')