Explorar o código

跨境商品推送调整

kevin hai 1 ano
pai
achega
4db8432e0f
Modificáronse 1 ficheiros con 7 adicións e 3 borrados
  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) {
             // 发送预警通知