* [perf story #59903] Adjust batchSaveTodoNotice method.

This commit is contained in:
wangyidong
2024-07-25 14:04:49 +08:00
committed by 孙广明
parent 1d9c078a89
commit afddd5c687
+16
View File
@@ -137,6 +137,22 @@ class messageModel extends model
$account = $this->app->user->account;
$newTodos = array();
foreach($todos as $todo)
{
$notice = new stdclass();
$notice->objectType = 'message';
$notice->action = 0;
$notice->toList = ",{$account},";
$notice->data = $todo->data;
$notice->status = 'wait';
$notice->createdBy = $account;
$notice->createdDate = helper::now();
$this->dao->insert(TABLE_NOTIFY)->data($notice)->exec();
$noticeID = $this->dao->lastInsertID();
$todo->id = $noticeID;
$newTodos[$noticeID] = $todo;
}
return $newTodos;
}