This commit is contained in:
wangyidong
2023-04-26 12:12:48 +08:00
parent 575990b6a3
commit dfcdb5d99c
+2 -2
View File
@@ -698,7 +698,6 @@ class docModel extends model
->beginIF(!common::hasPriv('doc', 'teamSpace'))->andWhere('t2.type')->ne('custom')->fi()
->beginIF($browseType == 'draft')->andWhere('t1.status')->eq('draft')->andWhere('t1.addedBy')->eq($this->app->user->account)->fi()
->beginIF($browseType == 'bysearch')->andWhere($query)->fi()
->beginIF(!empty($hasPrivDocIdList))->andWhere('t1.id')->in($hasPrivDocIdList)->fi()
->orderBy($orderBy)
->page($pager)
->fetchAll('id');
@@ -2188,12 +2187,13 @@ class docModel extends model
->andWhere('LEFT(t1.date, 10)')->eq($today)
->andWhere('t2.deleted')->eq(0)
->fetch('count');
$statistic->myEditedDocs = $this->dao->select('count(DISTINCT objectID) as count')->from(TABLE_ACTION)->alias('t1')
$statistic->myEditedDocs = $this->dao->select('count(DISTINCT t1.objectID) as count')->from(TABLE_ACTION)->alias('t1')
->leftJoin(TABLE_DOC)->alias('t2')->on("t1.objectID=t2.id and t1.objectType='doc'")
->where('t1.objectType')->eq('doc')
->andWhere('t1.action')->eq('edited')
->andWhere('t1.actor')->eq($this->app->user->account)
->andWhere('t1.vision')->eq($this->config->vision)
->andWhere('t2.lib')->ne('')
->andWhere('t2.deleted')->eq(0)
->fetch('count');