From e8d1cbb7cd1a577d563704e0031b6bc58a5df529 Mon Sep 17 00:00:00 2001
From: mkm <727897186@qq.com>
Date: Thu, 18 Jul 2024 17:40:48 +0800
Subject: [PATCH] =?UTF-8?q?feat(IndexController):=20=E6=B7=BB=E5=8A=A0?=
 =?UTF-8?q?=E8=BF=94=E5=9B=9E=E6=95=B0=E6=8D=AE=E5=A4=84=E7=90=86=E9=80=BB?=
 =?UTF-8?q?=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app/statistics/controller/IndexController.php | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/statistics/controller/IndexController.php b/app/statistics/controller/IndexController.php
index 269e9288f..ecab0ccf4 100644
--- a/app/statistics/controller/IndexController.php
+++ b/app/statistics/controller/IndexController.php
@@ -141,6 +141,7 @@ class IndexController extends BaseLikeController
             } else {
                 $item['nickname'] = '';
             }
+            return $item;
         });
         return $this->success('ok', $res?->toArray());
     }
@@ -160,7 +161,9 @@ class IndexController extends BaseLikeController
         //     return $this->fail(ProductLogic::getError()); //获取错误信息并返回错误信息
         // }
         $select = Db::connect('demo')->name('store_order')->where($where)->limit(20)->order('id desc')
-        ->field('id,order_id,pay_price,create_time')->select()->toArray();
+        ->field('id,order_id,pay_price,create_time')->select()->each(function ($item) {
+            $item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
+        })->toArray();
         return $this->success('ok', $select);
     }
     /**