commit | f4b8b6fc317250b0326afbb1a681bce627040481 | [log] [tgz] |
---|---|---|
author | 夜雨声烦 <xxi13552467509@163.com> | Thu Apr 24 00:58:36 2025 +0800 |
committer | 夜雨声烦 <xxi13552467509@163.com> | Thu Apr 24 00:58:36 2025 +0800 |
tree | 5f8d399f28cd312b1d932b183ded76d846470c30 | |
parent | 73fcb38b5fb9edf8044570fcae59af94be06a222 [diff] [blame] |
bug_fix+historyview Change-Id: I6f446c1b660a4322865cfcf5502c88cb772ca0a1
diff --git a/src/main/java/com/example/g8backend/service/IPostService.java b/src/main/java/com/example/g8backend/service/IPostService.java index 82c792e..a349b59 100644 --- a/src/main/java/com/example/g8backend/service/IPostService.java +++ b/src/main/java/com/example/g8backend/service/IPostService.java
@@ -2,6 +2,7 @@ import com.example.g8backend.entity.Post; import com.baomidou.mybatisplus.extension.service.IService; +import org.springframework.transaction.annotation.Transactional; import java.util.List; @@ -16,4 +17,7 @@ void unlikePost(Long userId, Long postId); List<Post> searchPosts(String keyword, List<Long> tagIds, String author); // 更新为支持多个标签 + + @Transactional + void recordViewHistory(Long userId, Long postId); }