解决详情页addVisit接口400错误

This commit is contained in:
xiongxiaoyang 2019-12-06 15:15:39 +08:00
parent d8ce698e71
commit 32847bc874

View File

@ -273,7 +273,7 @@ public class BookController {
@RequestMapping("addVisit")
@ResponseBody
public String addVisit(@RequestParam("bookId") Long bookId,@RequestParam("indexNum") Integer indexNum,@RequestParam("token") String token) {
public String addVisit(@RequestParam("bookId") Long bookId,@RequestParam(value = "indexNum",defaultValue = "0") Integer indexNum,@RequestParam(value = "token",defaultValue = "") String token) {
String userId = commonCacheUtil.get(token);
bookService.addVisitCount(bookId,userId,indexNum);