|
@@ -24,6 +24,7 @@ public class AsyncListener {
|
|
|
@EventListener
|
|
|
@Async //异步方法
|
|
|
public void updateUserRead(UserRecentReadEvent event) {
|
|
|
+ log.info("阅读记录: " + event.toString());
|
|
|
try {
|
|
|
BookContentVO bookContentVO = event.bookContentVO;
|
|
|
//尝试更新阅读记录
|
|
@@ -37,7 +38,9 @@ public class AsyncListener {
|
|
|
userRecentlyRead.setUpdatetime(DateUtils.getNow());
|
|
|
int i = userRecentlyReadMapper.updateByExampleSelective(userRecentlyRead,
|
|
|
UserRecentlyReadExample.newAndCreateCriteria()
|
|
|
- .andBookIdEqualTo(bookContentVO.getBookId()).example()
|
|
|
+ .andBookIdEqualTo(bookContentVO.getBookId())
|
|
|
+ .andUserIdEqualTo(bookContentVO.getUserId())
|
|
|
+ .example()
|
|
|
,
|
|
|
UserRecentlyRead.Column.chapterId,
|
|
|
UserRecentlyRead.Column.chapterName,
|