Get 获取单个互动信息
(ctx context.Context, postId uint)
| 89 | |
| 90 | // Get 获取单个互动信息 |
| 91 | func (i *interactiveService) Get(ctx context.Context, postId uint) (domain.Interactive, error) { |
| 92 | if postId == 0 { |
| 93 | return domain.Interactive{}, errors.New("invalid parameters") |
| 94 | } |
| 95 | return i.repo.Get(ctx, postId) |
| 96 | } |
| 97 | |
| 98 | // GetByIds 批量获取互动信息 |
| 99 | func (i *interactiveService) GetByIds(ctx context.Context, postIds []uint) (map[uint]domain.Interactive, error) { |