diff --git a/app/common/service/UploadedFilesService.php b/app/common/service/UploadedFilesService.php index 3689ac0..1e2435d 100644 --- a/app/common/service/UploadedFilesService.php +++ b/app/common/service/UploadedFilesService.php @@ -142,7 +142,9 @@ class UploadedFilesService */ public function getFile(array $where) { - $file = $this->logicShow(['where' => $where]); + $config['model'] = $this->modelClass; + $config['where'] = $where; + $file = $this->logicShow($config); if (!$file) { return false; @@ -159,14 +161,20 @@ class UploadedFilesService */ public function deleteFile(int $fileId): bool { - $file = $this->logicShow(['where' => ['id' => $fileId]]); + $config['model'] = $this->modelClass; + $config['where'] = ['id' => $fileId]; + $file = $this->logicShow($config); if (!$file) { return false; } // 删除数据库记录 - return $this->logicDeleteBy(['where' => ['id' => $fileId]]); + $config =[ + 'model' => $this->modelClass, + 'where' => ['id' => $fileId], + ]; + return $this->logicDeleteBy($config); } /**