修复bug

This commit is contained in:
zhao 2024-07-23 15:50:59 +08:00
parent 39c69b53b9
commit 7ef5265f91
2 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,6 @@ import java.util.Date;
* @author 阿沐 babamu@126.com * @author 阿沐 babamu@126.com
* @since 1.0.0 2024-07-16 * @since 1.0.0 2024-07-16
*/ */
@Data @Data
@TableName("t_book_comment") @TableName("t_book_comment")
public class TBookCommentEntity { public class TBookCommentEntity {

View File

@ -71,6 +71,7 @@ public class TBookCollectionServiceImpl extends BaseServiceImpl<TBookCollectionD
entity.setUserId(userId); entity.setUserId(userId);
entity.setBookId(bookId); entity.setBookId(bookId);
entity.setCreateTime(currentTime); entity.setCreateTime(currentTime);
entity.setStatus(1);
this.save(entity); this.save(entity);
} }
@ -87,6 +88,7 @@ public class TBookCollectionServiceImpl extends BaseServiceImpl<TBookCollectionD
LambdaQueryWrapper<TBookCollectionEntity> wrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<TBookCollectionEntity> wrapper = Wrappers.lambdaQuery();
wrapper.eq(TBookCollectionEntity::getBookId, bookId); wrapper.eq(TBookCollectionEntity::getBookId, bookId);
wrapper.eq(TBookCollectionEntity::getUserId, userId); wrapper.eq(TBookCollectionEntity::getUserId, userId);
wrapper.eq(TBookCollectionEntity::getStatus, 1);
return baseMapper.selectCount(wrapper) > 0; return baseMapper.selectCount(wrapper) > 0;
} }
} }