kevin 1 год назад
Родитель
Сommit
4db8432e0f
1 измененных файлов с 7 добавлено и 3 удалено
  1. 7 3
      frontendApi/modules/v1/controllers/ShopController.php

+ 7 - 3
frontendApi/modules/v1/controllers/ShopController.php

@@ -708,7 +708,7 @@ class ShopController extends BaseController {
     {
         $createdAtEnd = strtotime(date('Y-m-d')) - 1;
         // 早0点推送,前一天0-24点的订单
-        $orderList = Order::find()
+        $query = Order::find()
             ->where(
                 "(CREATED_AT <= :CREATED_AT_END) AND STATUS=:STATUS AND SEND_AT=:SEND_AT AND (PAY_TYPE='wechat' OR PAY_TYPE='alipay') AND IS_DELETE = 0",
                 [
@@ -718,8 +718,12 @@ class ShopController extends BaseController {
 //                    ':PAY_TYPE' => 'online',
                 ]
             )
-            ->asArray()
-            ->all();
+            ->asArray();
+//            ->all();
+
+        $commandQuery = clone $query;
+        LoggerTool::debug($commandQuery->createCommand()->getRawSql());
+        $orderList = $query->all();
 
         if (!$orderList) {
             // 发送预警通知