mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-28 05:11:39 +08:00
26 lines
547 B
PHP
26 lines
547 B
PHP
<?php
|
|
|
|
namespace App\Repos;
|
|
|
|
use App\Models\ImChatGroupUser as ImChatGroupUserModel;
|
|
use Phalcon\Mvc\Model;
|
|
|
|
class ImChatGroupUser extends Repository
|
|
{
|
|
|
|
/**
|
|
* @param int $groupId
|
|
* @param int $userId
|
|
* @return ImChatGroupUserModel|Model|bool
|
|
*/
|
|
public function findGroupUser($groupId, $userId)
|
|
{
|
|
return ImChatGroupUserModel::findFirst([
|
|
'conditions' => 'group_id = ?1 AND user_id = ?2',
|
|
'bind' => [1 => $groupId, 2 => $userId],
|
|
'order' => 'id DESC',
|
|
]);
|
|
}
|
|
|
|
}
|