src/Biz/IM/Dao/Impl/ConversationMemberDaoImpl.php

(开头部分) 1KB

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

<?php

namespace Biz\IM\Dao\Impl;

use Biz\IM\Dao\ConversationMemberDao;
use Codeages\Biz\Framework\Dao\GeneralDaoImpl;

class ConversationMemberDaoImpl extends GeneralDaoImpl implements ConversationMemberDao
{
    protected $table = 'im_member';

    public function getByConvNoAndUserId($convNo, $userId)
    {
        return $this->getByFields(array('convNo' => $convNo, 'userId' => $userId));
    }

    public function findByConvNo($convNo)
    {
        return $this->findByFields(array('convNo' => $convNo));
    }

    public function findByUserIdAndTargetType($userId, $targetType)
    {
        return $this->findByFields(array('userId' => $userId, 'targetType' => $targetType));
    }

    public function deleteByConvNoAndUserId($convNo, $userId)
    {
        return $this->db()->delete($this->table, array('convNo' => $convNo, 'userId' => $userId));
    }

    public function deleteByTargetIdAndTargetType($targetId, $targetType)
    {
        return $this->db()->delete($this->table, array('targetId' => $targetId, 'targetType' => $targetType));
    }

    public function declares()
    {
        return array(
            'orderbys' => array('createdTime'),
            'conditions' => array(
                'targetType IN (:targetTypes)',
                'targetType = :targetType',
                'targetId = :targetId',
                'targetId IN (:targetIds)',
                'userId = :userId',
                'convNo = :convNo',
            ),
        );
    }
}

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

AI 解读 AI

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

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