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']);