package com.red.circle.other.app.inner.endpoint.sys;

import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.other.app.inner.service.sys.AnchorSalaryExchangeGoldClientService;
import com.red.circle.other.inner.endpoint.sys.api.AnchorSalaryExchangeGoldClientApi;
import com.red.circle.other.inner.model.cmd.sys.SysAnchorSalaryExchangeGoldCmd;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 主播工资兑换糖果记录.
 * </p>
 *
 * @author pengshigang
 * @since 2021-10-26
 */
@Validated
@RestController
@RequestMapping(value = AnchorSalaryExchangeGoldClientApi.API_PREFIX, produces = MediaType.APPLICATION_JSON_VALUE)
@RequiredArgsConstructor
public class AnchorSalaryExchangeGoldClientEndpoint implements AnchorSalaryExchangeGoldClientApi {

  private final AnchorSalaryExchangeGoldClientService anchorSalaryExchangeGoldClientService;

  @Override
  public ResultResponse<Void> add(SysAnchorSalaryExchangeGoldCmd cmd) {
    anchorSalaryExchangeGoldClientService.add(cmd);
    return ResultResponse.success();
  }
}
