From 5eed480215d4ee9ca041fff733237008336b9a02 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Sat, 8 Jun 2024 10:30:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=BD=AC=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/lists/order/OrderList.php | 11 ++++++++++- app/api/logic/order/OrderLogic.php | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/api/lists/order/OrderList.php b/app/api/lists/order/OrderList.php index d4d9f4e3a..10c6bf001 100644 --- a/app/api/lists/order/OrderList.php +++ b/app/api/lists/order/OrderList.php @@ -44,7 +44,7 @@ class OrderList extends BaseAdminDataLists implements ListsSearchInterface { $userId=$this->request->userId; if(!$userId) return []; - return StoreOrder::with(['store'])->where($this->searchWhere)->where('uid',$userId) + $data = StoreOrder::with(['store'])->where($this->searchWhere)->where('uid',$userId) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() @@ -55,6 +55,15 @@ class OrderList extends BaseAdminDataLists implements ListsSearchInterface $item['goods_count']=count(explode(',',$item['cart_id'])); }) ->toArray(); + foreach ($data as &$value){ + if($value['refund_reason_time']){ + $value['refund_reason_time'] = date('Y-m-d H:i:s',$value['refund_reason_time']); + } + if($value['pay_time']){ + $value['pay_time'] = date('Y-m-d H:i:s',$value['pay_time']); + } + } + return $data; } diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index dcb768d8f..0131ba697 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -756,6 +756,7 @@ class OrderLogic extends BaseLogic $order['vip_price'] = number_format($totalVipPrices, 2); $order['refund_price'] = number_format($totalPrice, 2); $order['verify_code'] = verificationCode(); + $order['refund_reason_time'] = time(); $order['create_time'] = time()+1; $order['update_time'] = null; $order['delete_time'] = null;