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

import com.red.circle.framework.core.asserts.ResponseAssert;
import com.red.circle.other.inner.endpoint.dynamic.TopDynamicClient;
import com.red.circle.other.inner.model.cmd.dynamic.TopDynamicCmd;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 系统置顶动态 服务实现类.
 * </p>
 *
 * @author pengshigang
 * @since 2022-06-17
 */
@Service
@RequiredArgsConstructor
public class TopDynamicServiceImpl implements
    TopDynamicService {

  private final TopDynamicClient topDynamicClient;

  @Override
  public void setUpTop(TopDynamicCmd param) {

    ResponseAssert.requiredSuccess(topDynamicClient.setUpTop(param));

  }

  @Override
  public void closeTop(Long dynamicId) {

    ResponseAssert.requiredSuccess(topDynamicClient.closeTop(dynamicId));
  }
}
