Pārlūkot izejas kodu

收款码流水

shish 10 mēneši atpakaļ
vecāks
revīzija
550592b111

+ 27 - 0
app-ghs/controllers/ScanPayController.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace ghs\controllers;
+
+use bizGhs\order\classes\ScanPayClass;
+use common\components\util;
+use Yii;
+
+class ScanPayController extends BaseController
+{
+
+    public $guestAccess = [];
+
+    public function actionList()
+    {
+        $get = Yii::$app->request->get();
+        $status = $get['status'] ?? 0;
+        $where = [];
+        $where['mainId'] = $this->mainId;
+        if (!empty($status)) {
+            $where['status'] = $status;
+        }
+        $list = ScanPayClass::getPayList($where);
+        util::success($list);
+    }
+
+}

+ 27 - 0
app-hd/controllers/ScanPayController.php

@@ -0,0 +1,27 @@
+<?php
+
+namespace hd\controllers;
+
+use bizHd\order\classes\ScanPayClass;
+use common\components\util;
+use Yii;
+
+class ScanPayController extends BaseController
+{
+
+    public $guestAccess = [];
+
+    public function actionList()
+    {
+        $get = Yii::$app->request->get();
+        $status = $get['status'] ?? 0;
+        $where = [];
+        $where['mainId'] = $this->mainId;
+        if (!empty($status)) {
+            $where['status'] = $status;
+        }
+        $list = ScanPayClass::getPayList($where);
+        util::success($list);
+    }
+
+}

+ 18 - 0
biz-ghs/order/classes/ScanPayClass.php

@@ -0,0 +1,18 @@
+<?php
+
+namespace bizGhs\order\classes;
+
+use Yii;
+use bizGhs\base\classes\BaseClass;
+
+class ScanPayClass extends BaseClass
+{
+
+    public static $baseFile = '\bizGhs\order\models\ScanPay';
+
+    public static function getPayList($where)
+    {
+        return self::getList('*', $where, 'addTime DESC,id DESC');
+    }
+
+}

+ 15 - 0
biz-ghs/order/models/ScanPay.php

@@ -0,0 +1,15 @@
+<?php
+
+namespace bizGhs\order\models;
+
+use bizGhs\base\models\Base;
+
+class ScanPay extends Base
+{
+
+    public static function tableName()
+    {
+        return 'xhScanPay';
+    }
+
+}

+ 5 - 0
biz-hd/order/classes/ScanPayClass.php

@@ -37,6 +37,11 @@ class ScanPayClass extends BaseClass
 
     public static $baseFile = '\bizHd\order\models\ScanPay';
 
+    public static function getPayList($where)
+    {
+        return self::getList('*', $where, 'addTime DESC,id DESC');
+    }
+
     public static function addOrder($data)
     {
         $mainId = $data['mainId'] ?? 0;