shish 1 год назад
Родитель
Сommit
a0360db5e9
1 измененных файлов с 39 добавлено и 0 удалено
  1. 39 0
      console/controllers/BalanceChangeController.php

+ 39 - 0
console/controllers/BalanceChangeController.php

@@ -0,0 +1,39 @@
+<?php
+
+namespace console\controllers;
+
+use bizGhs\custom\models\CustomBalanceChange;
+use bizGhs\ghs\models\GhsBalanceChange;
+use yii\console\Controller;
+use Yii;
+
+class BalanceChangeController extends Controller
+{
+
+    public function actionCustom()
+    {
+        $query = new \yii\db\Query();
+        $query->from(CustomBalanceChange::tableName());
+        $query->where(['>', 'id', 0]);
+        foreach ($query->batch() as $changeList) {
+            foreach ($changeList as $change) {
+                print_r($change);
+                die;
+            }
+        }
+    }
+
+    public function actionGhs()
+    {
+        $query = new \yii\db\Query();
+        $query->from(GhsBalanceChange::tableName());
+        $query->where(['>', 'id', 0]);
+        foreach ($query->batch() as $changeList) {
+            foreach ($changeList as $change) {
+                print_r($change);
+                die;
+            }
+        }
+    }
+
+}