wuchimedes | a1bf278 | 2025-03-27 15:08:54 +0800 | [diff] [blame] | 1 | package com.example.g8backend.service; |
| 2 | |
| 3 | import com.baomidou.mybatisplus.extension.service.IService; |
夜雨声烦 | 7e6eb38 | 2025-04-22 01:18:00 +0800 | [diff] [blame] | 4 | import com.example.g8backend.entity.Message; |
wuchimedes | a1bf278 | 2025-03-27 15:08:54 +0800 | [diff] [blame] | 5 | import com.example.g8backend.entity.User; |
| 6 | import org.apache.ibatis.annotations.Param; |
| 7 | |
夜雨声烦 | 7e6eb38 | 2025-04-22 01:18:00 +0800 | [diff] [blame] | 8 | import java.util.List; |
| 9 | |
wuchimedes | a1bf278 | 2025-03-27 15:08:54 +0800 | [diff] [blame] | 10 | public interface IUserService extends IService<User> { |
| 11 | User getUserByName(@Param("name") String name); |
wuchimedes | 079c163 | 2025-04-02 22:01:20 +0800 | [diff] [blame] | 12 | User getUserByEmail(@Param("email") String email); |
wuchimedes | a0649c6 | 2025-04-05 15:53:39 +0800 | [diff] [blame] | 13 | User getUserByPasskey(@Param("passkey") String passkey); |
夜雨声烦 | 7e6eb38 | 2025-04-22 01:18:00 +0800 | [diff] [blame] | 14 | |
| 15 | // 关注功能 |
| 16 | boolean followUser(Long followerId, Long followedId); |
| 17 | boolean unfollowUser(Long followerId, Long followedId); |
| 18 | List<User> getFollowings(Long userId); |
| 19 | List<User> getFollowers(Long userId); |
| 20 | |
| 21 | // 私信功能 |
| 22 | Long sendMessage(Long senderId, Long receiverId, String content); |
| 23 | List<Message> getMessages(Long userId, Long partnerId); |
| 24 | List<Message> getMessageHistory(Long userId); |
wuchimedes | a1bf278 | 2025-03-27 15:08:54 +0800 | [diff] [blame] | 25 | } |