| 1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace addons\AvoidTax\common\models;
- use common\models\user\User as UserUser;
- /**
- * 商城User
- * @package addons\AvoidTax\common\models
- */
- class User extends UserUser
- {
- /**
- * 通过 会员昵称/手机号 查询会员ID
- *
- * @param string $keyword
- * @return array
- */
- public static function getIdsByKeywordAndMallId(int $mall_id, string $keyword)
- {
- return static::find()
- ->where(['mall_id' => $mall_id])
- ->andWhere([
- 'or',
- ['like', 'nickname', $keyword],
- ['like', 'mobile', $keyword],
- ])
- ->select('id')
- ->column();
- }
- }
|