package com.red.circle.other.app.inner.service.sys.impl;

import com.red.circle.other.app.inner.service.sys.AnchorSalaryExchangeGoldClientService;
import com.red.circle.other.infra.convertor.sys.OperationLogInnerConvertor;
import com.red.circle.other.infra.database.rds.service.sys.SysAnchorSalaryExchangeGoldService;
import com.red.circle.other.inner.model.cmd.sys.SysAnchorSalaryExchangeGoldCmd;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 主播工资兑换糖果记录.
 * </p>
 *
 * @author pengshigang
 * @since 2021-10-26
 */
@Service
@RequiredArgsConstructor
public class AnchorSalaryExchangeGoldClientServiceImpl implements
    AnchorSalaryExchangeGoldClientService {

  private final OperationLogInnerConvertor operationLogInnerConvertor;
  private final SysAnchorSalaryExchangeGoldService anchorSalaryExchangeGoldService;

  @Override
  public void add(SysAnchorSalaryExchangeGoldCmd cmd) {
    anchorSalaryExchangeGoldService.save(
        operationLogInnerConvertor.toSysAnchorSalaryExchangeGold(cmd));
  }
}
