From 5009f0a239ff7913aacd2feeb04184c09eb4cbd8 Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Mon, 22 Jan 2024 15:36:38 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E9=A6=96=E5=8D=95=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/UserController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/controller/UserController.php b/app/api/controller/UserController.php index 20cffc9b..70d9bcc2 100644 --- a/app/api/controller/UserController.php +++ b/app/api/controller/UserController.php @@ -322,7 +322,7 @@ class UserController extends BaseApiController { $page = $this->request->param('page_no', 1); $limit = $this->request->param('page_size', 15); - $firstOrderLogList = Db::name('user_invite_first_order_log')->where('user_id', $this->userId)->page($page, $limit)->select()->toArray(); + $firstOrderLogList = Db::name('user_invite_first_order_log')->where('user_id', $this->userId)->page($page, $limit)->select()->order('id', 'desc')->toArray(); foreach ($firstOrderLogList as &$item) { $item['order_info'] = Db::connect('mysql2')->name('store_order')->alias('o')->field('o.total_num,p.store_name,p.image')->leftJoin('store_order_product op', 'o.order_id=op.order_id')->leftJoin('store_product p', 'op.product_id = p.product_id')->where('o.order_sn', $item['order_no'])->find();