* [refac bug #66430] Adjust upload file for story.

This commit is contained in:
wangyidong
2025-11-17 16:24:24 +08:00
parent 6dea59f109
commit 7d511c4faf
2 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -795,12 +795,12 @@ class storyModel extends model
->where('id')->eq($storyID)->exec();
if(dao::isError()) return false;
$this->loadModel('file')->updateObjectID($this->post->uid, $storyID, 'story');
$this->loadModel('file')->updateObjectID($this->post->uid, $storyID, $oldStory->type);
$specChanged = $oldStory->version != $story->version;
if($specChanged)
{
$this->loadModel('file')->processFileDiffsForObject('story', $oldStory, $story, (string)$story->version);
$this->loadModel('file')->processFileDiffsForObject($oldStory->type, $oldStory, $story, (string)$story->version);
$this->storyTao->doCreateSpec($storyID, $story, $story->files);
if(!empty($story->reviewer)) $this->storyTao->doCreateReviewer($storyID, $story->reviewer, $story->version);
@@ -871,8 +871,8 @@ class storyModel extends model
if(dao::isError()) return false;
$this->loadModel('action');
$this->loadModel('file')->updateObjectID($this->post->uid, $storyID, 'story');
$this->file->processFileDiffsForObject('story', $oldStory, $story, (string)$oldStory->version);
$this->loadModel('file')->updateObjectID($this->post->uid, $storyID, $oldStory->type);
$this->file->processFileDiffsForObject($oldStory->type, $oldStory, $story, (string)$oldStory->version);
$this->storyTao->doUpdateSpec($storyID, $story, $oldStory);
$this->storyTao->doUpdateLinkStories($storyID, $story, $oldStory);
+3 -3
View File
@@ -85,11 +85,11 @@ class transferTao extends transferModel
*/
protected function getFileGroups(string $module, array $idList): array
{
if(in_array($module, array('epic', 'requirement'))) $module = "{$module},story";
return $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE)
->where('objectType')->eq($module)
->where('objectType')->in($module)
->beginIf($idList)->andWhere('objectID')->in($idList)->fi()
->andWhere('extra')
->ne('editor')
->andWhere('extra')->ne('editor')
->fetchGroup('objectID');
}