更新订单未支付
This commit is contained in:
parent
9273590197
commit
b4ba19e097
@ -83,13 +83,13 @@ class StoreGroupOrderRepository extends BaseRepository
|
|||||||
$query->where('StoreGroupOrder.is_del', 0);
|
$query->where('StoreGroupOrder.is_del', 0);
|
||||||
});
|
});
|
||||||
$count = $query->count();
|
$count = $query->count();
|
||||||
$list = $query->with(['orderList' => function (Relation $query) {
|
$groupList = $query->with(['orderList' => function (Relation $query) {
|
||||||
$query->field('order_id,group_order_id,activity_type,pay_price,status,mer_id')->with(['merchant' => function ($query) {
|
$query->field('order_id,group_order_id,activity_type,pay_price,status,mer_id')->with(['merchant' => function ($query) {
|
||||||
$query->field('mer_id,mer_name,settle_cycle,interest_rate');
|
$query->field('mer_id,mer_name,settle_cycle,interest_rate');
|
||||||
}, 'orderProduct','presellOrder']);
|
}, 'orderProduct','presellOrder']);
|
||||||
}, 'interest'])->page($page, $limit)->order('create_time DESC')->select();
|
}, 'interest'])->page($page, $limit)->order('create_time DESC')->select();
|
||||||
$return = [];
|
$list = [];
|
||||||
foreach ($list as $k => $item) {
|
foreach ($groupList as $k => $item) {
|
||||||
$current = $item->toArray();
|
$current = $item->toArray();
|
||||||
if (!empty($item->interest)) {
|
if (!empty($item->interest)) {
|
||||||
$interest = $item->interest->calculateInterest();
|
$interest = $item->interest->calculateInterest();
|
||||||
@ -97,9 +97,9 @@ class StoreGroupOrderRepository extends BaseRepository
|
|||||||
} else {
|
} else {
|
||||||
$current['interest']['total_amount'] = $item['total_price'];
|
$current['interest']['total_amount'] = $item['total_price'];
|
||||||
}
|
}
|
||||||
$return[] = $current;
|
$list[] = $current;
|
||||||
}
|
}
|
||||||
return compact('count', 'return');
|
return compact('count', 'list');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user