From 17c469fa19b886edb8083a12d7cca2fae6ba6974 Mon Sep 17 00:00:00 2001 From: wang hou sheng <76928547+wanghousheng@users.noreply.github.com> Date: Sun, 21 Apr 2024 15:15:55 +0800 Subject: [PATCH] 1 --- app/api/model/Order.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/api/model/Order.php b/app/api/model/Order.php index 6f72f092..a6f6c54c 100644 --- a/app/api/model/Order.php +++ b/app/api/model/Order.php @@ -115,9 +115,10 @@ class Order extends OrderModel // 设置订单类型条件 $dataTypeFilter = $this->getFilterDataType($dataType); //判断当前用户身份 + $userId = UserService::getCurrentLoginUserId(); $where = []; if (!UserService::isStore()) { - $where['user_id'] = UserService::getCurrentLoginUserId(); + $where['user_id'] = $userId; } // 当前用户ID $query = $this->with(['goods.image']);