Sfoglia il codice sorgente

feat: EK-879: 【AE】管理员增加“Country”属性,根据所选国家限制登录后所显示的奖金、余额等数据(二期).

kevinElken 9 mesi fa
parent
commit
a686ebdb53

+ 6 - 1
backendApi/modules/v1/models/lists/user/DecLevelList.php

@@ -4,6 +4,7 @@ namespace backendApi\modules\v1\models\lists\user;
 use backendApi\modules\v1\models\Admin;
 use common\helpers\Cache;
 use common\libs\dataList\DataListInterface;
+use common\models\Countries;
 use common\models\DecLevelLog;
 use common\models\User;
 use common\models\UserInfo;
@@ -27,12 +28,13 @@ class DecLevelList extends \common\libs\dataList\DataList implements DataListInt
     public function dataHandle()
     {
         $this->listData = DecLevelLog::lists($this->condition, $this->params, [
-            'select' => 'LL.*, CU.USER_NAME, ADM.ADMIN_NAME',
+            'select' => 'LL.*, CU.USER_NAME, ADM.ADMIN_NAME, C.NAME AS COUNTRY',
             'orderBy' => 'LL.CREATED_AT DESC, LL.ID DESC',
             'from' => DecLevelLog::tableName() . ' AS LL',
             'join' => [
                 ['LEFT JOIN', Admin::tableName() . ' AS ADM', 'LL.ADMIN_ID=ADM.ID'],
                 ['INNER JOIN', User::tableName() . ' AS CU', 'LL.USER_ID=CU.ID'],
+                ['INNER JOIN', Countries::tableName() . ' AS C', 'CU.COUNTRY_ID=C.ID'],
             ],
             'page' => $this->page,
             'pageSize' => $this->pageSize,
@@ -53,6 +55,9 @@ class DecLevelList extends \common\libs\dataList\DataList implements DataListInt
                     'header' => Yii::t('ctx', 'memberCode'),
                     'headerOther' => ['minWidth' => '120'],
                 ],
+                'COUNTRY' => [
+                    'header' => Yii::t('ctx', 'country'),
+                ],
                 'FROM_DEC_LV_NAME' => [
                     'header' => Yii::t('ctx', 'levelBeforeModification'),
                     'headerOther' => ['minWidth' => '110'],