* Replace setSearchSessionByQueryID to setQuery.
This commit is contained in:
@@ -3501,7 +3501,7 @@ class storyModel extends model
|
||||
$executionID = empty($executionID) ? 0 : $executionID;
|
||||
$products = empty($executionID) ? $this->product->getList($programID = 0, $status = 'all', $limit = 0, $line = 0, $shadow = 'all') : $this->product->getProducts($executionID);
|
||||
|
||||
$this->storyTao->setSearchSessionByQueryID($queryID, 'storyQuery', 'storyForm');
|
||||
$this->loadModel('search')->setQuery('story', $queryID);
|
||||
|
||||
$allProduct = "`product` = 'all'";
|
||||
$storyQuery = $this->session->storyQuery;
|
||||
|
||||
+1
-24
@@ -398,9 +398,7 @@ class storyTao extends storyModel
|
||||
{
|
||||
/* 获取查询条件。 */
|
||||
$rawModule = $this->app->rawModule;
|
||||
$queryName = $rawModule == 'projectstory' ? 'storyQuery' : 'executionStoryQuery';
|
||||
$formName = $rawModule == 'projectstory' ? 'storyForm' : 'executionStoryForm';
|
||||
$this->setSearchSessionByQueryID($queryID, $queryName, $formName);
|
||||
$this->loadModel('search')->setQuery($rawModule == 'projectstory' ? 'story' : 'executionStory', $queryID);
|
||||
if($this->session->executionStoryQuery == false) $this->session->set('executionStoryQuery', ' 1 = 1');
|
||||
if($rawModule == 'projectstory') $this->session->set('executionStoryQuery', $this->session->storyQuery);
|
||||
|
||||
@@ -425,27 +423,6 @@ class storyTao extends storyModel
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取保存的查询条件。
|
||||
* Set search session by queryID.
|
||||
*
|
||||
* @param int $queryID
|
||||
* @param string $queryName
|
||||
* @param string $formName
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function setSearchSessionByQueryID(int $queryID, string $queryName, string $formName): void
|
||||
{
|
||||
if($this->session->{$queryName} == false) $this->session->set($queryName, ' 1 = 1');
|
||||
|
||||
$query = $this->loadModel('search')->getQuery($queryID);
|
||||
if(empty($query)) return;
|
||||
|
||||
$this->session->set($queryName, $query->sql);
|
||||
$this->session->set($formName, $query->form);
|
||||
}
|
||||
|
||||
/**
|
||||
* 替换所有产品的查询条件。
|
||||
* Replace all product query.
|
||||
|
||||
Reference in New Issue
Block a user