This commit is contained in:
zhao 2024-07-18 15:08:37 +08:00
parent a487ac06f6
commit 9abbaea73e
4 changed files with 8 additions and 7 deletions

View File

@ -13,4 +13,6 @@ auth:
- /maku/t_user/updateUser - /maku/t_user/updateUser
- /maku/t_user/register - /maku/t_user/register
- /maku/t_user/logout - /maku/t_user/logout
- /maku/t_user/info - /maku/t_user/info
- /maku/t_book/list/search
- /maku/t_book/{id}

View File

@ -50,9 +50,8 @@ public class TBookController {
@GetMapping("/list/search") @GetMapping("/list/search")
@Operation(summary = "根据书名查询书籍") @Operation(summary = "根据书名查询书籍")
@Parameter @Parameter
public Result<TBookEntity> getByName(@RequestParam String name){ public Result<TBookEntity> getByName(@RequestParam String bookName){
TBookEntity entity = tBookService.getByName(name); TBookEntity entity = tBookService.getByName(bookName);
return Result.ok(entity); return Result.ok(entity);
} }

View File

@ -24,5 +24,5 @@ public interface TBookService extends BaseService<TBookEntity> {
void delete(List<Long> idList); void delete(List<Long> idList);
TBookEntity getByName(String name); TBookEntity getByName(String bookName);
} }

View File

@ -62,9 +62,9 @@ public class TBookServiceImpl extends BaseServiceImpl<TBookDao, TBookEntity> imp
} }
@Override @Override
public TBookEntity getByName(String name) { public TBookEntity getByName(String bookName) {
LambdaQueryWrapper<TBookEntity> wrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<TBookEntity> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TBookEntity::getBookName, name); wrapper.eq(TBookEntity::getBookName, bookName);
return baseMapper.selectOne(wrapper); return baseMapper.selectOne(wrapper);
} }