blob: 82c792e2e256b5ddbbb3b636a7d59d96983286a5 [file] [log] [blame]
wuchimedese5722e32025-04-13 17:38:50 +08001package com.example.g8backend.service;
2
3import com.example.g8backend.entity.Post;
4import com.baomidou.mybatisplus.extension.service.IService;
wuchimedes5a842b22025-04-21 22:01:39 +08005
wuchimedese5722e32025-04-13 17:38:50 +08006import java.util.List;
7
8public interface IPostService extends IService<Post> {
9 List<Post> getPostsByUserId(Long userId);
wuchimedes5a842b22025-04-21 22:01:39 +080010 void createPost(Post post);
11 void createPost(Post post, Long[] tagIds);
223010711f457dc2025-04-15 17:35:55 +080012 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);
夜雨声烦4527a722025-04-23 17:04:25 +080017
18 List<Post> searchPosts(String keyword, List<Long> tagIds, String author); // 更新为支持多个标签
wuchimedese5722e32025-04-13 17:38:50 +080019}