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