Просмотр исходного кода

feat: EK-2806: 会员端Promo和banner图增加分国家设置.

kevin 4 месяцев назад
Родитель
Сommit
d76b0a6a27
2 измененных файлов с 11 добавлено и 2 удалено
  1. 1 1
      backendApi/modules/v1/controllers/ArticleController.php
  2. 10 1
      common/models/Article.php

+ 1 - 1
backendApi/modules/v1/controllers/ArticleController.php

@@ -123,7 +123,7 @@ class ArticleController extends BaseController
             $condition .= ' AND ART.COUNTRY_ID IN (' . implode(',', $placeholders) . ')';
         }
 
-        $obj = new Article();
+        $obj = new IndexList();
         $data = $obj->getList(['condition' => $condition, 'params' => $params]);
 
         // 全部分类

+ 10 - 1
common/models/Article.php

@@ -5,6 +5,7 @@ namespace common\models;
 use backendApi\modules\v1\models\Admin;
 use backendApi\modules\v1\models\AdminCountry;
 use common\helpers\Tool;
+use common\libs\dataList\DataListInterface;
 use Yii;
 
 /**
@@ -19,7 +20,7 @@ use Yii;
  * @property int $SORT 排序值
  * @property int $CREATED_AT 创建时间
  */
-class Article extends \common\components\ActiveRecord
+class Article extends \common\libs\dataList\DataList implements DataListInterface
 {
     /**
      * @inheritdoc
@@ -29,6 +30,14 @@ class Article extends \common\components\ActiveRecord
         return '{{%ARTICLE}}';
     }
 
+    /**
+     * 列表名称
+     * @return string
+     */
+    public function getListName(){
+        return '会员列表';
+    }
+
     public function dataHandle()
     {
         $this->condition .= '';