From 7a063925f59db6ffc7c33c8ca5bf537e5598b7dc Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Sat, 7 Dec 2019 10:02:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E8=B4=B9=E6=A8=A1=E6=9D=BF=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E5=88=A0=E9=99=A4=E7=9C=81=E5=B8=82=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=EF=BC=8C=E5=9F=BA=E6=9C=AC=E6=95=B0=E9=87=8F=EF=BC=8C=E5=9F=BA?= =?UTF-8?q?=E6=9C=AC=E8=B4=B9=E7=94=A8=EF=BC=8C=E7=BB=AD=E9=87=8D=E6=95=B0?= =?UTF-8?q?=E9=87=8F=EF=BC=8C=E7=BB=AD=E9=87=8D=E8=B4=B9=E7=94=A8=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/modules/shop/models/ars/ExpressTemplate.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backend/modules/shop/models/ars/ExpressTemplate.php b/backend/modules/shop/models/ars/ExpressTemplate.php index 27bd453..b0ef8b7 100644 --- a/backend/modules/shop/models/ars/ExpressTemplate.php +++ b/backend/modules/shop/models/ars/ExpressTemplate.php @@ -79,4 +79,13 @@ class ExpressTemplate extends \yii\db\ActiveRecord ], ]; } + + /** + * @return array + * 数据键值对 + */ + public static function modelColumn() + { + return $column = self::find()->select(['name'])->indexBy('id')->column(); + } }