clock打卡前端
This commit is contained in:
@@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.book.entity.BookClockEntryEntity;
|
||||
import com.peanut.modules.book.entity.BookEntity;
|
||||
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 org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -23,6 +25,8 @@ public class UserClockController {
|
||||
private BookClockEntryService bookClockEntryService;
|
||||
@Autowired
|
||||
private BookClockEntryChatService bookClockEntryChatService;
|
||||
@Autowired
|
||||
private BookService bookService;
|
||||
|
||||
/**
|
||||
* 获取书打卡列表
|
||||
@@ -41,6 +45,17 @@ public class UserClockController {
|
||||
return R.ok().put("page",bookClockEntryEntityPage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取读书打卡详情
|
||||
* @param entryId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getBookClockDetail")
|
||||
public R getBookClockDetail(@RequestParam Integer entryId){
|
||||
BookClockEntryEntity byId = bookClockEntryService.getById(entryId);
|
||||
return R.ok().put("entry",byId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增读书打卡
|
||||
* @param bookClockEntry
|
||||
@@ -73,4 +88,31 @@ public class UserClockController {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户已购打卡书列表
|
||||
* @param userId
|
||||
* @param limit
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getUserClockBooks")
|
||||
public R getUserClockBooks(@RequestParam Integer userId,@RequestParam Integer limit,@RequestParam Integer page){
|
||||
Page<BookEntity> userClockBooks = bookService.getUserClockBooks(userId, limit, page);
|
||||
return R.ok().put("page",userClockBooks);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户推荐打卡图书列表
|
||||
* @param userId
|
||||
* @param limit
|
||||
* @param page
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getUserClockBestBooks")
|
||||
public R getUserClockBestBooks(@RequestParam Integer userId,@RequestParam Integer limit,@RequestParam Integer page){
|
||||
Page<BookEntity> userClockBestBooks = bookService.getUserClockBestBooks(userId, limit, page);
|
||||
return R.ok().put("page",userClockBestBooks);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user