Procházet zdrojové kódy

今日实收的查询条件加上 payStatus

shizhongqi před 4 roky
rodič
revize
e19650a262
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      app-ghs/controllers/ConsoleController.php

+ 2 - 2
app-ghs/controllers/ConsoleController.php

@@ -21,12 +21,12 @@ class ConsoleController extends BaseController
         $todayDate = date('Y-m-d');
         $todayStartTime = $todayDate . ' 00:00:00';
         $todayEndTime = $todayDate . ' 23:59:59';
-        $where = ['shopId' => $this->shopId, 'debt' => 0];
+        $where = ['shopId' => $this->shopId, 'debt' => 0, 'payStatus' => 2];
         $where['addTime'] = ['between', [$todayStartTime, $todayEndTime]];
         $todayActIncome = OrderClass::sum($where, 'actPrice'); // 今日实收
         $todayActIncome = $todayActIncome === null ? 0 : $todayActIncome;
 
-        $where = ['shopId' => $this->shopId, 'debt' => 1]; // 重新赋值
+        $where = ['shopId' => $this->shopId, 'debt' => 1]; // 查询条件重新赋值
         $where['addTime'] = ['between', [$todayStartTime, $todayEndTime]];
         $todayDebt = OrderClass::sum($where, 'debtPrice'); // 今日欠款
         $todayDebt = $todayDebt === null ? 0 : $todayDebt;