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;