From ce1716feacbbe3d7c1f79121a73332bec7d8cf8b Mon Sep 17 00:00:00 2001 From: sgm0422 <976204163@qq.com> Date: Fri, 13 Mar 2020 10:09:02 +0800 Subject: [PATCH] * Code for requirement. --- db/update12.1.sql | 16 ++++++++++++++++ module/product/model.php | 2 +- module/product/view/browse.html.php | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/db/update12.1.sql b/db/update12.1.sql index db28bab230..c895677432 100644 --- a/db/update12.1.sql +++ b/db/update12.1.sql @@ -1 +1,17 @@ ALTER TABLE `zt_story` ADD `parent` mediumint NOT NULL DEFAULT '0' AFTER `id`; + +CREATE TABLE `zt_relation` ( + `id` int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY, + `program` mediumint(8) NOT NULL, + `product` mediumint(8) NOT NULL, + `project` mediumint(8) NOT NULL, + `AType` char(30) NOT NULL, + `AID` mediumint(8) NOT NULL, + `AVersion` char(30) NOT NULL, + `relation` char(30) NOT NULL, + `BType` char(30) NOT NULL, + `BID` mediumint(8) NOT NULL, + `BVersion` char(30) NOT NULL, + `extra` char(30) NOT NULL, + UNIQUE KEY `relation` (`relation`,`AType`,`BType`, `AID`, `BID`) +) ENGINE='MyISAM' DEFAULT CHARSET=utf8; diff --git a/module/product/model.php b/module/product/model.php index b457f4ede0..a8139a2964 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -584,7 +584,7 @@ class productModel extends model if($browseType == 'changedstory') $stories = $this->story->getByStatus($productID, $branch, $modules, 'changed', $type, $sort, $pager); if($browseType == 'willclose') $stories = $this->story->get2BeClosed($productID, $branch, $modules, $type, $sort, $pager); if($browseType == 'closedstory') $stories = $this->story->getByStatus($productID, $branch, $modules, 'closed', $type, $sort, $pager); - if($browseType == 'emptysr') $stories = $this->story->getEmptysr($productID, $branch, $modules, '', $type, $sort, $pager); + if($browseType == 'emptysr') $stories = $this->story->getEmptySR($productID, $branch, $modules, '', $type, $sort, $pager); return $stories; } diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 8b1899ceb7..ef1e82c97d 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -33,6 +33,7 @@ foreach(customModel::getFeatureMenu($this->moduleName, $this->methodName) as $menuItem) { if(isset($menuItem->hidden)) continue; + if($menuItem->name == 'emptysr' && $storyType == 'story') continue; $menuBrowseType = strpos($menuItem->name, 'QUERY') === 0 ? 'bySearch' : $menuItem->name; if($menuItem->name == 'more') {