package com.red.circle.other.app.command.activity.query;

import com.red.circle.other.app.convertor.user.UserCustomGiftAppConvertor;
import com.red.circle.other.infra.database.rds.service.user.user.UserCustomGiftRecordService;
import com.red.circle.other.inner.model.dto.user.UserCustomGiftRecordDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 获取用户专属礼物资料
 *
 * @author zongpubin on 2024/1/31
 */
@Component
@RequiredArgsConstructor
public class UserCustomGiftRecordQryExe {

  private final UserCustomGiftAppConvertor userCustomGiftAppConvertor;
  private final UserCustomGiftRecordService userCustomGiftRecordService;

  public UserCustomGiftRecordDTO execute(Long id) {
    return userCustomGiftAppConvertor.toUserCustomGiftRecordDTO(
        userCustomGiftRecordService.getById(id));
  }
}
