* Finish task#44172,task#44273.

This commit is contained in:
leiyong
2021-11-11 05:26:27 +00:00
parent ef338371e1
commit 088a6374df
12 changed files with 273 additions and 17 deletions
+26
View File
@@ -24,6 +24,32 @@ class webhookModel extends model
return $webhook;
}
/**
* Get a webhook by type.
*
* @param int $type
* @access public
* @return object
*/
public function getByType($type)
{
$webhook = $this->dao->select('*')->from(TABLE_WEBHOOK)->where('type')->eq($type)->fetch();
return $webhook;
}
/**
* Get a webhook by type.
*
* @param int $type
* @access public
* @return object
*/
public function getBindAccount($webhookID, $webhookType, $openID)
{
$account = $this->dao->select('account')->from(TABLE_OAUTH)->where('providerID')->eq($webhookID)->andWhere('providerType')->eq($webhookType)->andWhere('openID')->eq($openID)->fetch('account');
return $account;
}
/**
* Get webhook list.
*