wuchimedes | e5722e3 | 2025-04-13 17:38:50 +0800 | [diff] [blame] | 1 | package com.example.g8backend.service; |
| 2 | |
| 3 | import com.example.g8backend.entity.Post; |
| 4 | import com.baomidou.mybatisplus.extension.service.IService; |
wuchimedes | 5a842b2 | 2025-04-21 22:01:39 +0800 | [diff] [blame] | 5 | |
wuchimedes | e5722e3 | 2025-04-13 17:38:50 +0800 | [diff] [blame] | 6 | import java.util.List; |
| 7 | |
| 8 | public interface IPostService extends IService<Post> { |
| 9 | List<Post> getPostsByUserId(Long userId); |
wuchimedes | 5a842b2 | 2025-04-21 22:01:39 +0800 | [diff] [blame] | 10 | void createPost(Post post); |
| 11 | void createPost(Post post, Long[] tagIds); |
22301071 | 1f457dc | 2025-04-15 17:35:55 +0800 | [diff] [blame] | 12 | Post updatePost(Post post); |
| 13 | List<Post> getPostsByType(String postType); |
| 14 | Long getPostLikeCount(Long postId); |
| 15 | void likePost(Long userId, Long postId); |
| 16 | void unlikePost(Long userId, Long postId); |
夜雨声烦 | 4527a72 | 2025-04-23 17:04:25 +0800 | [diff] [blame] | 17 | |
| 18 | List<Post> searchPosts(String keyword, List<Long> tagIds, String author); // 更新为支持多个标签 |
wuchimedes | e5722e3 | 2025-04-13 17:38:50 +0800 | [diff] [blame] | 19 | } |