Skip to content

Commit

Permalink
♻(repository): 重命名 getByPkId
Browse files Browse the repository at this point in the history
  • Loading branch information
Joycezhangw committed Apr 23, 2024
1 parent f7e2c96 commit 539f1b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Repositories/BaseRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Repositories/Interfaces/BaseInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/**
* 根据条件,获取一条指定字段数据
Expand Down

0 comments on commit 539f1b5

Please sign in to comment.