完善notebook
This commit is contained in:
parent
6e7dde5235
commit
1e86af810f
@ -61,5 +61,5 @@ public interface NotebookService {
|
||||
* @param notebookId 笔记本id
|
||||
* @return 结果
|
||||
*/
|
||||
boolean checkNotebookIdExist(Long notebookId);
|
||||
boolean isNotebookNotExist(Long notebookId);
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ public class NotebookServiceImpl implements NotebookService {
|
||||
throw new ServiceException("用户不存在");
|
||||
}
|
||||
|
||||
if (!checkNotebookIdExist(notebook.getId())) {
|
||||
if (isNotebookNotExist(notebook.getId())) {
|
||||
throw new ServiceException("笔记本不存在");
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ public class NotebookServiceImpl implements NotebookService {
|
||||
|
||||
@Override
|
||||
public NotebookVO getNotebook(Long notebookId) {
|
||||
if (!checkNotebookIdExist(notebookId)) {
|
||||
if (isNotebookNotExist(notebookId)) {
|
||||
throw new ServiceException("笔记本不存在");
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ public class NotebookServiceImpl implements NotebookService {
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public boolean checkNotebookIdExist(Long notebookId) {
|
||||
public boolean isNotebookNotExist(Long notebookId) {
|
||||
return notebookMapper.exists(new LambdaQueryWrapper<Notebook>().eq(Notebook::getId, notebookId));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user