src/Biz/User/Dao/Impl/UserDaoImpl.php

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

namespace Biz\User\Dao\Impl;

use Biz\User\Dao\UserDao;
use Codeages\Biz\Framework\Dao\AdvancedDaoImpl;

class UserDaoImpl extends AdvancedDaoImpl implements UserDao
{
    protected $table = 'user';

    public function getByEmail($email)
    {
        return $this->getByFields(array('email' => $email));
    }

    public function getUserByType($type)
    {
        return $this->getByFields(array('type' => $type));
    }

    public function getByNickname($nickname)
    {
        return $this->getByFields(array('nickname' => $nickname));
    }

    public function getByUUID($uuid)
    {
        return $this->getByFields(array('uuid' => $uuid));
    }

    public function countByMobileNotEmpty()
    {
        $sql = "SELECT COUNT(DISTINCT `mobile`) FROM `user` AS u, `user_profile` AS up WHERE u.id = up.id AND u.`locked` = 0 AND `mobile` != '' AND type <> 'system'";

        return $this->db()->fetchColumn($sql, array(), 0);
    }

    public function findUnlockedUsersWithMobile($start, $limit)
    {
        $sql = "SELECT * FROM `user` AS u, `user_profile` AS up WHERE u.id = up.id AND u.`locked` = 0 AND `mobile` != '' AND type <> 'system'";

        $sql = $this->sql($sql, array('createdTime' => 'ASC'), $start, $limit);

        return $this->db()->fetchAll($sql);
    }

    public function getByVerifiedMobile($mobile)
    {
        return $this->getByFields(array('verifiedMobile' => $mobile));
    }

    public function findByNicknames(array $nicknames)
    {
        return $this->findInField('nickname', $nicknames);
    }

    public function findByIds(array $ids)
    {
        return $this->findInField('id', $ids);

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。