* 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
@@ -157,19 +157,20 @@ class webhook extends control
return true;
}
$now = helper::now();
foreach($dataList as $data)
{
$webhook = zget($webhooks, $data->webhook, '');
$webhook = zget($webhooks, $data->objectID, '');
if($webhook)
{
$result = $this->webhook->fetchHook($webhook, $data->data);
$this->webhook->saveLog($webhook, $data->action, $data->data, $result);
}
$this->dao->update(TABLE_WEBHOOKDATAS)->set('status')->eq('sended')->where('id')->eq($data->id)->exec();
$this->dao->update(TABLE_NOTIFY)->set('status')->eq('sended')->set('sendTime')->eq($now)->where('id')->eq($data->id)->exec();
}
$this->dao->delete()->from(TABLE_WEBHOOKDATAS)->where('status')->eq('sended')->exec();
$this->dao->delete()->from(TABLE_NOTIFY)->where('status')->eq('sended')->exec();
echo "OK\n";
return true;