From 539f1b5a4b766c8584371aba9987a1d3382c72b0 Mon Sep 17 00:00:00 2001 From: joycezhang <787027175@qq.com> Date: Tue, 23 Apr 2024 23:13:47 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB(repository):=20=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D=20getByPkId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Repositories/BaseRepository.php | 2 +- src/Repositories/Interfaces/BaseInterface.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Repositories/BaseRepository.php b/src/Repositories/BaseRepository.php index b47e140..85c3a97 100644 --- a/src/Repositories/BaseRepository.php +++ b/src/Repositories/BaseRepository.php @@ -226,7 +226,7 @@ public function doesntExistWhere(array $where): bool * @param int $id 主键id * @return mixed */ - public function getByPkId(int $id) + public function getInfoById(int $id) { return $this->model->find($id); } diff --git a/src/Repositories/Interfaces/BaseInterface.php b/src/Repositories/Interfaces/BaseInterface.php index 58e7080..3e5921e 100644 --- a/src/Repositories/Interfaces/BaseInterface.php +++ b/src/Repositories/Interfaces/BaseInterface.php @@ -102,7 +102,7 @@ public function doesntExistWhere(array $where): bool; * @param int $id 主键id * @return mixed */ - public function getByPkId(int $id); + public function getInfoById(int $id); /** * 根据条件,获取一条指定字段数据