This commit is contained in:
wangjinlei
2023-10-10 16:45:46 +08:00
parent e682d9934e
commit d23ec8b533
2 changed files with 19 additions and 6 deletions

View File

@@ -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);
}

View File

@@ -0,0 +1,15 @@
package com.peanut.modules.book.to;
import lombok.Data;
import java.io.Serializable;
@Data
public class PageIdDto implements Serializable {
private Integer id;
private Integer limit;
private Integer page;
}