package com.xunhong.erp.turbo.biz.app.service;

import com.xunhong.erp.turbo.api.biz.api.DealerRebateCustomerServiceI;
import com.xunhong.erp.turbo.api.biz.dto.cmd.DealerRebateCustomerCreateCmd;
import com.xunhong.erp.turbo.api.biz.dto.cmd.DealerRebateCustomerDestroyCmd;
import com.xunhong.erp.turbo.api.biz.dto.cmd.DealerRebateCustomerUpdateCmd;
import com.xunhong.erp.turbo.api.biz.dto.qry.DealerRebateCustomerListQry;
import com.xunhong.erp.turbo.api.biz.dto.qry.DealerRebateCustomerPageQry;
import com.xunhong.erp.turbo.api.biz.dto.qry.DealerRebateCustomerShowQry;
import com.xunhong.erp.turbo.api.biz.dto.vo.DealerRebateCustomerVO;
import com.xunhong.erp.turbo.base.dto.PageDTO;
import com.xunhong.erp.turbo.biz.app.executor.cmd.DealerRebateCustomerCreateCmdExe;
import com.xunhong.erp.turbo.biz.app.executor.cmd.DealerRebateCustomerDestroyCmdExe;
import com.xunhong.erp.turbo.biz.app.executor.cmd.DealerRebateCustomerUpdateCmdExe;
import com.xunhong.erp.turbo.biz.app.executor.query.DealerRebateCustomerListQryExe;
import com.xunhong.erp.turbo.biz.app.executor.query.DealerRebateCustomerPageQryExe;
import com.xunhong.erp.turbo.biz.app.executor.query.DealerRebateCustomerShowQryExe;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author shenyifei
 */
@Slf4j
@Service
@DubboService(interfaceClass = DealerRebateCustomerServiceI.class, version = "1.0.0")
@RequiredArgsConstructor
public class DealerRebateCustomerServiceImpl implements DealerRebateCustomerServiceI {

	private final DealerRebateCustomerCreateCmdExe dealerRebateCustomerCreateCmdExe;
	private final DealerRebateCustomerUpdateCmdExe dealerRebateCustomerUpdateCmdExe;
	private final DealerRebateCustomerPageQryExe dealerRebateCustomerPageQryExe;
	private final DealerRebateCustomerListQryExe dealerRebateCustomerListQryExe;
	private final DealerRebateCustomerShowQryExe dealerRebateCustomerShowQryExe;
	private final DealerRebateCustomerDestroyCmdExe dealerRebateCustomerDestroyCmdExe;

	@Override
	public DealerRebateCustomerVO create(DealerRebateCustomerCreateCmd dealerRebateCustomerCreateCmd) {
		return dealerRebateCustomerCreateCmdExe.execute(dealerRebateCustomerCreateCmd);
	}

	@Override
	public PageDTO<DealerRebateCustomerVO> page(DealerRebateCustomerPageQry dealerRebateCustomerPageQry) {
		return PageDTO.of(dealerRebateCustomerPageQryExe.execute(dealerRebateCustomerPageQry));
	}

	@Override
	public List<DealerRebateCustomerVO> list(DealerRebateCustomerListQry dealerRebateCustomerListQry) {
		return dealerRebateCustomerListQryExe.execute(dealerRebateCustomerListQry);
	}

	@Override
	public DealerRebateCustomerVO update(DealerRebateCustomerUpdateCmd dealerRebateCustomerUpdateCmd) {
		return dealerRebateCustomerUpdateCmdExe.execute(dealerRebateCustomerUpdateCmd);
	}

	@Override
	public DealerRebateCustomerVO show(DealerRebateCustomerShowQry dealerRebateCustomerShowQry) {
		return dealerRebateCustomerShowQryExe.execute(dealerRebateCustomerShowQry);
	}

	@Override
	public void destroy(DealerRebateCustomerDestroyCmd dealerRebateCustomerDestroyCmd) {
		dealerRebateCustomerDestroyCmdExe.execute(dealerRebateCustomerDestroyCmd);
	}
}

