Merge branch 'master' of http://47.96.1.176:3000/work/book-api into xiaoqiantx
# Conflicts: # maku-framework/src/main/resources/auth.yml
This commit is contained in:
commit
ce0d641770
|
@ -48,12 +48,11 @@ public class TBookCommentController {
|
|||
return Result.ok(TBookCommentConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@PostMapping("/comment")
|
||||
@Operation(summary = "保存")
|
||||
@PreAuthorize("hasAuthority('maku:t_book_comment:save')")
|
||||
public Result<String> save(@RequestBody TBookCommentVO vo){
|
||||
tBookCommentService.save(vo);
|
||||
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
|
|
@ -50,14 +50,10 @@ public class TBookController {
|
|||
@GetMapping("/list/search")
|
||||
@Operation(summary = "根据书名查询书籍")
|
||||
@Parameter
|
||||
public Result<TBookEntity> getByName(@RequestParam String name){
|
||||
TBookEntity entity = tBookService.getByName(name);
|
||||
|
||||
public Result<TBookEntity> getByName(@RequestParam String bookName){
|
||||
TBookEntity entity = tBookService.getByName(bookName);
|
||||
return Result.ok(entity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
@PreAuthorize("hasAuthority('maku:t_book:page')")
|
||||
|
@ -66,8 +62,6 @@ public class TBookController {
|
|||
|
||||
return Result.ok(page);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
// @PreAuthorize("hasAuthority('maku:t_book:info')")
|
||||
|
@ -75,7 +69,6 @@ public class TBookController {
|
|||
TBookEntity entity = tBookService.getById(id);
|
||||
return Result.ok(TBookConvert.INSTANCE.convert(entity));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
@PreAuthorize("hasAuthority('maku:t_book:save')")
|
||||
|
|
|
@ -24,5 +24,5 @@ public interface TBookService extends BaseService<TBookEntity> {
|
|||
|
||||
void delete(List<Long> idList);
|
||||
|
||||
TBookEntity getByName(String name);
|
||||
TBookEntity getByName(String bookName);
|
||||
}
|
|
@ -62,9 +62,9 @@ public class TBookServiceImpl extends BaseServiceImpl<TBookDao, TBookEntity> imp
|
|||
}
|
||||
|
||||
@Override
|
||||
public TBookEntity getByName(String name) {
|
||||
public TBookEntity getByName(String bookName) {
|
||||
LambdaQueryWrapper<TBookEntity> wrapper = Wrappers.lambdaQuery();
|
||||
wrapper.eq(TBookEntity::getBookName, name);
|
||||
wrapper.eq(TBookEntity::getBookName, bookName);
|
||||
return baseMapper.selectOne(wrapper);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user