Forráskód Böngészése

订单查询方式

shish 4 éve
szülő
commit
eed013679d
1 módosított fájl, 3 hozzáadás és 3 törlés
  1. 3 3
      console/controllers/PurchaseController.php

+ 3 - 3
console/controllers/PurchaseController.php

@@ -23,7 +23,7 @@ class PurchaseController extends Controller
         $date = date("Y-m-d H:i:s");
         //找出一个星期内可以标记为过期的订单
         $startDate = date("Y-m-d H:i:s", strtotime('-7 days'));
-        $query->where(['status' => PurchaseClass::STATUS_UN_PAY])->where(['cgStyle' => $hdInvite])->andWhere(['>', 'deadline', $startDate])->andWhere(['<=', 'deadline', $date]);
+        $query->where(['status' => PurchaseClass::STATUS_UN_PAY])->andWhere(['cgStyle' => $hdInvite])->andWhere(['>', 'deadline', $startDate])->andWhere(['<=', 'deadline', $date]);
         $query->orderBy('deadline ASC');
 
         Yii::$app->params['ptStyle'] = dict::getDict('ptStyle', 'hd');
@@ -45,7 +45,7 @@ class PurchaseController extends Controller
                     PurchaseService::expire($current);
                     $transaction->commit();
 
-                    //noticeUtil::push("采购单已过期,库存已回滚 订单号:{$orderSn}", '15280215347');
+                    noticeUtil::push("采购单已过期,库存已回滚 订单号:{$orderSn}", '15280215347');
 
                 } catch (\Exception $e) {
                     $transaction->rollBack();
@@ -76,7 +76,7 @@ class PurchaseController extends Controller
         $date = date("Y-m-d H:i:s");
         //找出一个星期内可以标记为欠款的订单
         $startDate = date("Y-m-d H:i:s", strtotime('-7 days'));
-        $query->where(['status' => PurchaseClass::STATUS_UN_PAY])->where(['cgStyle' => $ghsInvite])->andWhere(['>', 'autoSetTime', $startDate])->andWhere(['<=', 'autoSetTime', $date]);
+        $query->where(['status' => PurchaseClass::STATUS_UN_PAY])->andWhere(['cgStyle' => $ghsInvite])->andWhere(['>', 'autoSetTime', $startDate])->andWhere(['<=', 'autoSetTime', $date]);
         $query->orderBy('autoSetTime ASC');
 
         Yii::$app->params['ptStyle'] = dict::getDict('ptStyle', 'hd');