package com.red.circle.console.app.service.app.activity;

import com.red.circle.framework.core.asserts.ResponseAssert;
import com.red.circle.framework.dto.PageResult;
import com.red.circle.other.inner.endpoint.activity.ActivityPictureConfigClient;
import com.red.circle.other.inner.model.cmd.activity.ActivityPictureQryCmd;
import com.red.circle.other.inner.model.dto.activity.ActivityPictureConfigDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 活动图片配置
 *
 * @author zongpubin on 2024/1/29
 */
@Service
@RequiredArgsConstructor
public class PictureConfigServiceImpl implements PictureConfigService {

  private final ActivityPictureConfigClient activityPictureConfigClient;

  @Override
  public PageResult<ActivityPictureConfigDTO> getActivityPicture(ActivityPictureQryCmd query) {
    return ResponseAssert.requiredSuccess(activityPictureConfigClient.getActivityPicture(query));
  }

  @Override
  public void addActivityPicture(ActivityPictureConfigDTO dto) {
    activityPictureConfigClient.addActivityPicture(dto);
  }

  @Override
  public void removeActivityPicture(Long id) {
    activityPictureConfigClient.removeActivityPicture(id);
  }

  @Override
  public void updateActivityPicture(ActivityPictureConfigDTO dto) {
    activityPictureConfigClient.updateActivityPicture(dto);
  }
}
