* [refac story #74538] Add db index.
This commit is contained in:
+7
-3
@@ -1,11 +1,15 @@
|
||||
CREATE TABLE IF NOT EXISTS `zt_actionproduct` (
|
||||
`action` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL,
|
||||
`product` mediumint(8) unsigned NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||
CREATE INDEX `action_product` ON `zt_actionproduct`(`action`, `product`);
|
||||
|
||||
ALTER TABLE `zt_actionrecent` ADD INDEX `vision_date` (`vision`, `date`);
|
||||
ALTER TABLE `zt_actionrecent` DROP INDEX `date`;
|
||||
ALTER TABLE `zt_actionrecent` ADD INDEX `vision_date` (`vision`, `date`);
|
||||
ALTER TABLE `zt_actionrecent` ADD INDEX `execution` (`execution`);
|
||||
|
||||
ALTER TABLE `zt_action` ADD INDEX `vision_date` (`vision`, `date`);
|
||||
ALTER TABLE `zt_action` DROP INDEX `date`;
|
||||
ALTER TABLE `zt_action` DROP INDEX `project`;
|
||||
ALTER TABLE `zt_action` ADD INDEX `vision_date` (`vision`, `date`);
|
||||
ALTER TABLE `zt_action` ADD INDEX `execution` (`execution`);
|
||||
ALTER TABLE `zt_action` ADD INDEX `project` (`project`);
|
||||
|
||||
@@ -1211,7 +1211,7 @@ class actionModel extends model
|
||||
$docLibList = $this->dao->select('*')->from(TABLE_DOCLIB)->where('id')->in($docLibIdList)->fetchAll('id');
|
||||
foreach($docLibList as $docLib)
|
||||
{
|
||||
if(!$this->checkPrivLib($docLib)) unset($docLibList[$lib->id]);
|
||||
if(!$this->checkPrivLib($docLib)) unset($docLibList[$docLib->id]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2571,6 +2571,8 @@ class execution extends control
|
||||
*/
|
||||
public function dynamic(int $executionID = 0, string $type = 'today', string $param = '', int $recTotal = 0, string $date = '', string $direction = 'next')
|
||||
{
|
||||
if(empty($type)) $type = 'today';
|
||||
|
||||
/* Save session. */
|
||||
$uri = $this->app->getURI(true);
|
||||
$this->session->set('productList', $uri, 'product');
|
||||
|
||||
@@ -497,6 +497,7 @@ class product extends control
|
||||
*/
|
||||
public function dynamic(int $productID = 0, string $type = 'today', int $param = 0, int $recTotal = 0, string $date = '', string $direction = 'next')
|
||||
{
|
||||
if(empty($type)) $type = 'today';
|
||||
$this->loadModel('action');
|
||||
|
||||
/* Save env data. */
|
||||
|
||||
@@ -747,6 +747,8 @@ class project extends control
|
||||
*/
|
||||
public function dynamic(int $projectID = 0, string $type = 'today', string $param = '', int $recTotal = 0, int $date = 0, string $direction = 'next')
|
||||
{
|
||||
if(empty($type)) $type = 'today';
|
||||
|
||||
$this->loadModel('execution');
|
||||
$this->project->setMenu($projectID);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user