修改待付款列表的错误
This commit is contained in:
parent
03c1c4e40f
commit
6d79a72c93
@ -63,11 +63,24 @@ class StoreGroupOrderRepository extends BaseRepository
|
||||
*/
|
||||
public function getList(array $where, $page, $limit)
|
||||
{
|
||||
$query = $this->search($where);
|
||||
$query = StoreGroupOrder::getDB()->alias('StoreGroupOrder');
|
||||
if (isset($where['product_type'])) {
|
||||
$storeOrderWhere = StoreOrder::where('activity_type', $where['product_type']);
|
||||
$query->hasWhere('orderList', $storeOrderWhere);
|
||||
}
|
||||
$query->when(isset($where['paid']) && $where['paid'] !== '', function ($query) use ($where) {
|
||||
if ($where['paid'] == 0) {
|
||||
$query->whereRaw("StoreGroupOrder.paid=0 or (StoreGroupOrder.paid=1 and StoreGroupOrder.pay_type=8)");
|
||||
} else {
|
||||
$query->where('StoreGroupOrder.paid', $where['paid']);
|
||||
}
|
||||
})->when(isset($where['uid']) && $where['uid'] !== '', function ($query) use ($where) {
|
||||
$query->where('StoreGroupOrder.uid', $where['uid']);
|
||||
})->order('create_time DESC')->when(isset($where['is_del']) && $where['is_del'] !== '', function ($query) use ($where) {
|
||||
$query->where('StoreGroupOrder.is_del', $where['is_del']);
|
||||
}, function ($query) {
|
||||
$query->where('StoreGroupOrder.is_del', 0);
|
||||
});
|
||||
$count = $query->count();
|
||||
$list = $query->with(['orderList' => function (Relation $query) {
|
||||
$query->field('order_id,group_order_id,activity_type,pay_price,status,mer_id')->with(['merchant' => function ($query) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user