Merge branch 'feature/stock_next' into develop
This commit is contained in:
@@ -142,7 +142,9 @@ class UploadedFilesService
|
|||||||
*/
|
*/
|
||||||
public function getFile(array $where)
|
public function getFile(array $where)
|
||||||
{
|
{
|
||||||
$file = $this->logicShow(['where' => $where]);
|
$config['model'] = $this->modelClass;
|
||||||
|
$config['where'] = $where;
|
||||||
|
$file = $this->logicShow($config);
|
||||||
|
|
||||||
if (!$file) {
|
if (!$file) {
|
||||||
return false;
|
return false;
|
||||||
@@ -159,14 +161,20 @@ class UploadedFilesService
|
|||||||
*/
|
*/
|
||||||
public function deleteFile(int $fileId): bool
|
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) {
|
if (!$file) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除数据库记录
|
// 删除数据库记录
|
||||||
return $this->logicDeleteBy(['where' => ['id' => $fileId]]);
|
$config =[
|
||||||
|
'model' => $this->modelClass,
|
||||||
|
'where' => ['id' => $fileId],
|
||||||
|
];
|
||||||
|
return $this->logicDeleteBy($config);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user