|
|
|
@ -73,11 +73,22 @@ class Merchant extends BaseModel |
|
|
|
|
*/ |
|
|
|
|
public function getList(array $param = []): \think\Paginator |
|
|
|
|
{ |
|
|
|
|
return $this->with(['logoImage']) |
|
|
|
|
$res = $this->with(['logoImage']) |
|
|
|
|
->where($this->getFilter($param)) |
|
|
|
|
->where('is_delete', '=', 0) |
|
|
|
|
->order(['sort' => 'asc', $this->getPk()]) |
|
|
|
|
->paginate(15); |
|
|
|
|
->paginate(15)->toArray(); |
|
|
|
|
|
|
|
|
|
foreach ($res as $kr => $r) { |
|
|
|
|
$res[$kr]['licenseImg'] = []; |
|
|
|
|
if ($r['license_img_id']) { |
|
|
|
|
$img_ids = explode(",", $r['license_img_id']); |
|
|
|
|
$files = UploadFile::getFileList($img_ids); |
|
|
|
|
$res[$kr]['licenseImg'] = $files ?: null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return $res; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|