feat(post): enhance post handling with channel integration

- Updated PostHandler to include channel information in post responses.
- Introduced PostChannelBrief DTO to represent channel details associated with posts.
- Modified post conversion functions to support channel data, ensuring proper mapping of channel IDs to channel names.
- Enhanced ChannelRepository and ChannelService to facilitate batch retrieval of channels by IDs.
- Updated wire generation to inject channel service into post handler for improved functionality.
This commit is contained in:
lafay
2026-03-25 00:58:41 +08:00
parent fc0d6ff19d
commit 7c14cf5bab
7 changed files with 137 additions and 40 deletions

View File

@@ -64,9 +64,10 @@ func ProvideUserHandler(
func ProvidePostHandler(
postService service.PostService,
userService service.UserService,
channelService service.ChannelService,
logService *service.LogService,
) *handler.PostHandler {
h := handler.NewPostHandler(postService, userService)
h := handler.NewPostHandler(postService, userService, channelService)
if ps, ok := postService.(interface{ SetLogService(*service.LogService) }); ok {
ps.SetLogService(logService)
}