Browse Source

结账记录

shish 3 years ago
parent
commit
c22d9016bd
1 changed files with 6 additions and 2 deletions
  1. 6 2
      app-ghs/controllers/PurchaseClearController.php

+ 6 - 2
app-ghs/controllers/PurchaseClearController.php

@@ -16,7 +16,11 @@ class PurchaseClearController extends BaseController
     {
         $post = Yii::$app->request->post();
         $current = time();
-        $list = ClearClass::getAllByCondition(['shopId' => $this->shopId, 'status' => PurchaseClearClass::STATUS_AWAIT_PAY], null, '*', null, true);
+        $list = ClearClass::getAllByCondition([
+            'clearStyle' => dict::getDict('clearStyle', 'gys2KmGys'),
+            'shopId' => $this->shopId,
+            'status' => PurchaseClearClass::STATUS_AWAIT_PAY
+        ], null, '*', null, true);
         if (!empty($list)) {
             foreach ($list as $item) {
                 $deadline = $item->deadline;
@@ -25,7 +29,7 @@ class PurchaseClearController extends BaseController
                     $item->status = PurchaseClearClass::STATUS_EXPIRE;
                     $item->save();
                 } else {
-                    util::fail('还有结算订单待付款');
+                    util::fail('还有待付款的结账单');
                 }
             }
         }