Merge branch 'main' into zentao_menu

This commit is contained in:
dingyongliang
2024-08-28 14:13:55 +08:00
369 changed files with 9457 additions and 1255 deletions
+3 -5
View File
@@ -188,7 +188,7 @@ class adminModel extends model
if($menuKey == 'company' && $this->app->rawModule != 'convert')
{
$dept = $this->dao->select('id')->from(TABLE_DEPT)->fetch();
$dept = $this->dao->select('id')->from(TABLE_DEPT)->limit(1)->fetch();
if($dept && common::hasPriv('company', 'browse')) $menu['link'] = helper::createLink('company', 'browse');
}
@@ -428,11 +428,9 @@ class adminModel extends model
*/
public function genDateUsed(): object
{
$firstUseDate = $this->dao->select('date')->from(TABLE_ACTION)
->where('date')->gt('1970-01-01')
$firstUseDate = $this->dao->select('min(`date`) as `date`')->from(TABLE_ACTION)
->where('`date`')->gt('1970-01-01')
->andWhere('actor')->eq($this->app->user->account)
->orderBy('date_asc')
->limit('1')
->fetch('date');
if($firstUseDate) $firstUseDate = substr($firstUseDate, 0, 10);