ryan пре 1 месец
родитељ
комит
459cb5997f

+ 1 - 0
backendApi/config/urlManagerRules.php

@@ -502,6 +502,7 @@ return [
             'GET transfer-list-export' => 'transfer-list-export',
             'GET history-bonus-export' => 'history-bonus-export',
             'GET recharge' => 'recharge',
+            'GET recharge-type' => 'recharge-type',
             'GET,POST recharge-status' => 'recharge-status',
             'GET recharge-export' => 'recharge-export',
             'POST mult-point' => 'mult-point',

+ 35 - 0
backendApi/modules/v1/controllers/FinanceController.php

@@ -1184,6 +1184,41 @@ class FinanceController extends BaseController {
         return static::notice($data);
     }
 
+    /**
+     * 充值列表
+     * @return mixed
+     * @throws \yii\base\Exception
+     * @throws \yii\web\HttpException
+     */
+    public function actionRechargeType()
+    {
+        $filter = $this->filterCondition([
+            'SN' => 'R.SN',
+            'USER_NAME' => 'UI.USER_NAME',
+            'AMOUNT' => 'R.AMOUNT',
+            'AUDIT_STATUS' => 'R.AUDIT_STATUS',
+            'BANK_NO' => 'R.BANK_NO',
+            'CREATED_AT' => 'R.CREATED_AT',
+        ]);
+        $condition = $filter['condition'];
+        $params = $filter['params'];
+
+        $isSuper = AdminRole::isSuperAdmin(\Yii::$app->getUser()->getUserInfo()['roleId']);
+        if (!$isSuper) {
+            $adminId = Yii::$app->getUser()->getUserInfo()['id'];
+            $adminCountry = AdminCountry::getCountry($adminId);
+            $quotedAdminCountry = array_map(function($item) {
+                return "'" . addslashes($item) . "'";
+            }, $adminCountry);
+
+            $condition .= " AND U.COUNTRY_ID IN (" . implode(',', $quotedAdminCountry) . ")";
+        }
+
+        $listObj = new RechargeList();
+        $data = $listObj->getList(['condition' => $condition, 'params' => $params]);
+        return static::notice($data);
+    }
+
     /**
      * 充值导出
      * @return mixed

+ 1 - 1
backendApi/modules/v1/models/lists/finance/RechargeList.php

@@ -118,7 +118,7 @@ class RechargeList extends \common\libs\dataList\DataList implements DataListInt
                     ],
                 ],
                 'TYPE' => [
-                    'header' => \Yii::t('ctx', 'modelsListsFinanceRechargeListgetColumnType'), // 备注
+                    'header' => \Yii::t('ctx', 'modelsListsFinanceRechargeListgetColumnType'), // 类型
                     'headerOther' => [
                         'width' => '150',
                     ],