feature/main20240421
郭嘉 8 months ago
parent 8f89f7e7da
commit 15438984a4
  1. 2
      app/admin/controller/Feedback.php
  2. 8
      app/common/model/UploadFile.php

@ -75,7 +75,7 @@ class Feedback extends Controller
$res[$kr]['imgs'] = []; $res[$kr]['imgs'] = [];
if ($r['imgs']) { if ($r['imgs']) {
$img_ids = explode(",", $r['imgs']); $img_ids = explode(",", $r['imgs']);
$files = UploadFile::getFileList($img_ids); $files = UploadFile::getFileListBySuper($img_ids);
$list['data'][$kr]['imgs'] = $files ?: null; $list['data'][$kr]['imgs'] = $files ?: null;
} }
} }

@ -110,4 +110,12 @@ class UploadFile extends BaseModel
->where('is_delete', '=', 0) ->where('is_delete', '=', 0)
->select(); ->select();
} }
public static function getFileListBySuper(array $fileIds, int $storeId = null)
{
return (new static)->where('file_id', 'in', $fileIds)
//->where('store_id', '=', $storeId ?: self::$storeId)
->where('is_delete', '=', 0)
->select();
}
} }

Loading…
Cancel
Save