feat: 完善订单列表接口
parent
4bafdb2687
commit
0225c18ba8
|
@ -922,7 +922,7 @@ class OrderLogic extends Logic
|
||||||
$order_data['distribution_money'] = 0;
|
$order_data['distribution_money'] = 0;
|
||||||
$order_data['coupon_list_id'] = $coupon_list_id;
|
$order_data['coupon_list_id'] = $coupon_list_id;
|
||||||
$order_data['create_time'] = time();
|
$order_data['create_time'] = time();
|
||||||
|
|
||||||
$order_create = $Order->create($order_data);
|
$order_create = $Order->create($order_data);
|
||||||
|
|
||||||
if (false === $order_create) {
|
if (false === $order_create) {
|
||||||
|
@ -1177,14 +1177,14 @@ class OrderLogic extends Logic
|
||||||
$lists = $order->where(['del' => 0, 'user_id' => $user_id])
|
$lists = $order->where(['del' => 0, 'user_id' => $user_id])
|
||||||
->where($where)
|
->where($where)
|
||||||
->with(['order_goods', 'shop'])
|
->with(['order_goods', 'shop'])
|
||||||
->field('id,order_sn,order_status,pay_status,order_amount,order_status,order_type,shipping_status,create_time,shop_id,delivery_type')
|
->field('id,order_sn,order_status,pay_status,order_amount,order_status,order_type,shipping_status,create_time,shop_id,delivery_type,frontend_info,is_frontend')
|
||||||
->page($page, $size)
|
->page($page, $size)
|
||||||
->order('id desc')
|
->order('id desc')
|
||||||
->select();
|
->select();
|
||||||
|
|
||||||
$lists->append(['goods_count', 'pay_btn', 'cancel_btn', 'delivery_btn', 'take_btn', 'del_btn', 'comment_btn', 'content_btn','order_cancel_time']);
|
$lists->append(['goods_count', 'pay_btn', 'cancel_btn', 'delivery_btn', 'take_btn', 'del_btn', 'comment_btn', 'content_btn','order_cancel_time']);
|
||||||
|
|
||||||
foreach ($lists as $list) {
|
foreach ($lists as $k => $list) {
|
||||||
if ($list['order_type'] == OrderEnum::SECKILL_ORDER) {//如果是秒杀
|
if ($list['order_type'] == OrderEnum::SECKILL_ORDER) {//如果是秒杀
|
||||||
foreach ($list['order_goods'] as $item) {
|
foreach ($list['order_goods'] as $item) {
|
||||||
$seckill_price = GoodsItem::isSeckill($item['item_id']);
|
$seckill_price = GoodsItem::isSeckill($item['item_id']);
|
||||||
|
@ -1193,6 +1193,7 @@ class OrderLogic extends Logic
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$lists[$k]['frontend_array'] = explode(',', $list['frontend_info']);
|
||||||
}
|
}
|
||||||
$data = [
|
$data = [
|
||||||
'list' => $lists,
|
'list' => $lists,
|
||||||
|
|
Loading…
Reference in New Issue