| 1234567891011121314151617181920212223242526272829 |
- <?php
- namespace addons\YunfastPay\common\models;
- use addons\Store\common\models\Store as ModelsStore;
- /**
- * Store class
- * @package addons\YunfastPay\common\models
- */
- class Store extends ModelsStore
- {
- /**
- * 获取店铺名称
- *
- * @param integer $storeId
- * @return string
- */
- public static function getStoreNameById(int $storeId)
- {
- if ($storeId == 0) return '平台';
-
- return static::find()
- ->select('store_name')
- ->where(['id' => $storeId])
- ->scalar();
- }
- }
|