feature/main20240421
郭嘉 8 months ago
parent 4bbc9ef582
commit 139af4befe
  1. 11
      app/common/model/Feedback.php

@ -28,6 +28,15 @@ class Feedback extends BaseModel
// 定义主键
protected $pk = 'feedback_id';
/**
* 关联模型:主图视频文件
* @return HasOne
*/
public function store(): HasOne
{
return $this->hasOne('Store', 'store_id', 'store_id');
}
/**
* 详情信息
@ -51,7 +60,7 @@ class Feedback extends BaseModel
*/
public function getList(array $param = [], int $pageSize = 15): \think\Paginator
{
$res = $this->where($this->getFilter($param))
$res = $this->with(['store.store_name'])->where($this->getFilter($param))
->where('is_delete', '=', 0)
->order(['create_time' => 'desc', $this->getPk()])
->paginate($pageSize);

Loading…
Cancel
Save