|
|
|
@ -43,10 +43,14 @@ class OrderRefund extends OrderRefundModel |
|
|
|
|
} |
|
|
|
|
$filterOr = []; |
|
|
|
|
if (!empty($param['searchValue']) && $param['searchType'] == 'all') { |
|
|
|
|
// $filterOr = [ |
|
|
|
|
// ['order.order_no', 'like', "%{$param['searchValue']}%"], |
|
|
|
|
// ['user.nick_name', 'like', "%{$param['searchValue']}%"], |
|
|
|
|
// ['order.user_id', '=', (int)$param['searchValue']] |
|
|
|
|
// ]; |
|
|
|
|
|
|
|
|
|
$filterOr = [ |
|
|
|
|
['order.order_no', 'like', "%{$param['searchValue']}%"], |
|
|
|
|
['user.nick_name', 'like', "%{$param['searchValue']}%"], |
|
|
|
|
['order.user_id', '=', (int)$param['searchValue']] |
|
|
|
|
['order.order_no|user.nick_name|order.user_id', 'like', "%{$param['searchValue']}%"] |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -57,7 +61,8 @@ class OrderRefund extends OrderRefundModel |
|
|
|
|
->join('user', 'user.user_id = order.user_id') |
|
|
|
|
->where($filter); |
|
|
|
|
if(!empty($filterOr)){ |
|
|
|
|
$query = $query->whereOr($filterOr); |
|
|
|
|
// $query = $query->whereOr($filterOr); |
|
|
|
|
$query = $query->where($filterOr); |
|
|
|
|
} |
|
|
|
|
$list = $query->order(['refund.create_time' => 'desc', 'refund.' . $this->getPk()]) |
|
|
|
|
->paginate(10); |
|
|
|
|