* finish task #3562.

This commit is contained in:
wangyidong
2018-01-08 15:50:53 +08:00
parent cf8b8902b4
commit b10b13b4b8
11 changed files with 130 additions and 52 deletions
+4 -3
View File
@@ -96,7 +96,7 @@ class webhookModel extends model
*/
public function getDataList()
{
return $this->dao->select('*')->from(TABLE_WEBHOOKDATAS)->where('status')->eq('wait')->orderBy('id')->fetchAll('id');
return $this->dao->select('*')->from(TABLE_NOTIFY)->where('status')->eq('wait')->andWhere('objectType')->eq('webhook')->orderBy('id')->fetchAll('id');
}
/**
@@ -435,13 +435,14 @@ class webhookModel extends model
public function saveData($webhookID, $actionID, $data)
{
$webhookData = new stdclass();
$webhookData->webhook = $webhookID;
$webhookData->objectType = 'webhook';
$webhookData->objectID = $webhookID;
$webhookData->action = $actionID;
$webhookData->data = $data;
$webhookData->createdBy = $this->app->user->account;
$webhookData->createdDate = helper::now();
$this->dao->insert(TABLE_WEBHOOKDATAS)->data($webhookData)->exec();
$this->dao->insert(TABLE_NOTIFY)->data($webhookData)->exec();
return !dao::isError();
}