dto
This commit is contained in:
@@ -9,6 +9,7 @@ import com.peanut.modules.book.service.BookClockEntryChatService;
|
||||
import com.peanut.modules.book.service.BookClockEntryService;
|
||||
import com.peanut.modules.book.service.BookService;
|
||||
import com.peanut.modules.book.service.UserBookClockService;
|
||||
import com.peanut.modules.book.to.PageIdDto;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -30,18 +31,15 @@ public class UserClockController {
|
||||
|
||||
/**
|
||||
* 获取书打卡列表
|
||||
* @param bookId
|
||||
* @param limit
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getBookClocks")
|
||||
public R getBookClocks(@RequestParam Integer bookId,@RequestParam Integer limit,@RequestParam Integer page){
|
||||
public R getBookClocks(@RequestBody PageIdDto page){
|
||||
LambdaQueryWrapper<BookClockEntryEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(BookClockEntryEntity::getBookId,bookId);
|
||||
wrapper.eq(BookClockEntryEntity::getBookId,page.getId());
|
||||
wrapper.eq(BookClockEntryEntity::getDelFlag,0);
|
||||
wrapper.orderByAsc(BookClockEntryEntity::getDay);
|
||||
Page<BookClockEntryEntity> bookClockEntryEntityPage = bookClockEntryService.getBaseMapper().selectPage(new Page<BookClockEntryEntity>(page, limit), wrapper);
|
||||
Page<BookClockEntryEntity> bookClockEntryEntityPage = bookClockEntryService.getBaseMapper().selectPage(new Page<BookClockEntryEntity>(page.getPage(), page.getLimit()), wrapper);
|
||||
return R.ok().put("page",bookClockEntryEntityPage);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user