Ver Fonte

修复:批量移动文件分组时报错

Yahoo há 4 anos atrás
pai
commit
a9cc2d7884
1 ficheiros alterados com 3 adições e 3 exclusões
  1. 3 3
      app/store/model/UploadFile.php

+ 3 - 3
app/store/model/UploadFile.php

@@ -110,11 +110,11 @@ class UploadFile extends UploadFileModel
      * 批量移动文件分组
      * @param int $groupId
      * @param array $fileIds
-     * @return $this
+     * @return bool
      */
-    public function moveGroup(int $groupId, array $fileIds): UploadFile
+    public function moveGroup(int $groupId, array $fileIds): bool
     {
-        return $this->where('file_id', 'in', $fileIds)->update(['group_id' => $groupId]);
+        return static::updateBase(['group_id' => $groupId], [['file_id', 'in', $fileIds]]);
     }
 
     /**