Link party IDs to users in chat: added getPartyId query, updated EventUser with partyId field, and adjusted message filtering logic in ChatService.

This commit is contained in:
2026-08-01 18:47:06 +02:00
parent 3100ac21c3
commit 0d6a4ee8dd
4 changed files with 41 additions and 5 deletions
@@ -4,6 +4,7 @@ import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Optional;
public interface ChatLogMapper {
@@ -15,4 +16,10 @@ public interface ChatLogMapper {
""")
List<ChatLogDao> getChatLogs(@Param("since") long since);
@Select("""
SELECT party_id FROM chat_users
WHERE uuid = #{uuid}
""")
Optional<Integer> getPartyId(@Param("uuid") String uuid);
}