* change getStoryStages method name to batchGetStoryStage.

This commit is contained in:
chenfeiCF
2016-03-12 21:32:03 +08:00
parent bbbd0891ff
commit 91194fcccc
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -166,7 +166,7 @@ class product extends control
$this->view->moduleID = $moduleID;
$this->view->branch = $branch;
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
$this->view->storyStages = $this->product->getStoryStages($stories);
$this->view->storyStages = $this->product->batchGetStoryStage($stories);
$this->display();
}
+3 -3
View File
@@ -385,19 +385,19 @@ class productModel extends model
}
/**
* Get story stages.
* Batch get story stage.
*
* @param array $stories.
* @access public
* @return array
*/
public function getStoryStages($stories)
public function batchGetStoryStage($stories)
{
/* Set story id list. */
$storyIdList = array();
foreach($stories as $story) $storyIdList[$story->id] = $story->id;
return $this->loadModel('story')->getStoryStages($storyIdList);
return $this->loadModel('story')->batchGetStoryStage($storyIdList);
}
/**
+2 -2
View File
@@ -1598,13 +1598,13 @@ class storyModel extends model
}
/**
* Get story stages.
* Batch get story stage.
*
* @param array $stories
* @access public
* @return array
*/
public function getStoryStages($stories)
public function batchGetStoryStage($stories)
{
return $this->dao->select('*')->from(TABLE_STORYSTAGE)
->where('story')->in($stories)