|
|
|
@ -23,6 +23,7 @@ class RetailDescribe extends RetDescribeModel |
|
|
|
|
$filter = $this->getFilter($param); |
|
|
|
|
$list = $this->field('*') |
|
|
|
|
->where($filter) |
|
|
|
|
->order(['create_time' => 'asc','sort' => 'asc']) |
|
|
|
|
->paginate($param['pageSize'] ?? 15); |
|
|
|
|
return $list; |
|
|
|
|
} |
|
|
|
@ -53,8 +54,7 @@ class RetailDescribe extends RetDescribeModel |
|
|
|
|
$params = $this->setQueryDefaultValue($param, [ |
|
|
|
|
'plate_id' => 0, // 类型id |
|
|
|
|
'search' => '', // 查询内容 |
|
|
|
|
'wholesale' => 0, // 批发商城 |
|
|
|
|
'retail' => 0, // 零售商城 |
|
|
|
|
'type' => 0, // 商城类型 |
|
|
|
|
'description_status' => 0, // 状态 |
|
|
|
|
]); |
|
|
|
|
// 检索查询条件 |
|
|
|
@ -64,8 +64,7 @@ class RetailDescribe extends RetDescribeModel |
|
|
|
|
// 用户昵称/订单号 |
|
|
|
|
!empty($params['search']) && $filter[] = ['feature|function_description', 'like', "%{$params['search']}%"]; |
|
|
|
|
// 批发商城类型 |
|
|
|
|
$params['wholesale'] > 0 && $filter[] = ['wholesale', '=', (int)$params['wholesale']]; |
|
|
|
|
$params['retail'] > 0 && $filter[] = ['retail', '=', (int)$params['retail']]; |
|
|
|
|
$params['type'] > 0 && $filter[] = ['type', '=', (int)$params['type']]; |
|
|
|
|
// 支付状态 |
|
|
|
|
$params['description_status'] > 0 && $filter[] = ['description_status', '=', (int)$params['description_status']]; |
|
|
|
|
return $filter; |
|
|
|
|