* code for change collector field to collects.

This commit is contained in:
wangyidong
2023-04-14 16:14:42 +08:00
parent ecd6e5a511
commit e5ff2093cb
3 changed files with 14 additions and 4 deletions
+2 -2
View File
@@ -3271,7 +3271,7 @@ class docModel extends model
if($action == 'collect')
{
$collectCount = $this->dao->select('count(*) as count')->from(TABLE_DOCACTION)->where('doc')->eq($docID)->andWhere('action')->eq('collect')->fetch('count');
$this->dao->update(TABLE_DOC)->set('collector')->eq($collectCount)->where('id')->eq($docID)->exec();
$this->dao->update(TABLE_DOC)->set('collects')->eq($collectCount)->where('id')->eq($docID)->exec();
}
return $actionID;
@@ -3307,7 +3307,7 @@ class docModel extends model
if($action->action == 'collect')
{
$collectCount = $this->dao->select('count(*) as count')->from(TABLE_DOCACTION)->where('doc')->eq($action->doc)->andWhere('action')->eq('collect')->fetch('count');
$this->dao->update(TABLE_DOC)->set('collector')->eq($collectCount)->where('id')->eq($action->doc)->exec();
$this->dao->update(TABLE_DOC)->set('collects')->eq($collectCount)->where('id')->eq($action->doc)->exec();
}
}