where('typeId', 2) // 门店端固定为2 ->where('deleteTime', 0) ->find(); } /** * 根据账号或手机号查找用户 * @param string $account 账号或手机号 * @return array|null */ public static function getByAccountOrPhone($account) { return self::where(function($query) use ($account) { $query->where('account', $account) ->whereOr('phone', $account); }) ->where('typeId', 2) // 门店端固定为2 ->where('deleteTime', 0) ->find(); } }