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

import com.xunhong.erp.turbo.api.biz.api.DealerPaymentAccountServiceI;
import com.xunhong.erp.turbo.api.biz.dto.cmd.DealerPaymentAccountCreateCmd;
import com.xunhong.erp.turbo.api.biz.dto.cmd.DealerPaymentAccountDestroyCmd;
import com.xunhong.erp.turbo.api.biz.dto.cmd.DealerPaymentAccountUpdateCmd;
import com.xunhong.erp.turbo.api.biz.dto.qry.DealerPaymentAccountListQry;
import com.xunhong.erp.turbo.api.biz.dto.qry.DealerPaymentAccountPageQry;
import com.xunhong.erp.turbo.api.biz.dto.qry.DealerPaymentAccountShowQry;
import com.xunhong.erp.turbo.api.biz.dto.vo.DealerPaymentAccountVO;
import com.xunhong.erp.turbo.base.dto.PageDTO;
import com.xunhong.erp.turbo.biz.app.executor.cmd.DealerPaymentAccountCreateCmdExe;
import com.xunhong.erp.turbo.biz.app.executor.cmd.DealerPaymentAccountDestroyCmdExe;
import com.xunhong.erp.turbo.biz.app.executor.cmd.DealerPaymentAccountUpdateCmdExe;
import com.xunhong.erp.turbo.biz.app.executor.query.DealerPaymentAccountListQryExe;
import com.xunhong.erp.turbo.biz.app.executor.query.DealerPaymentAccountPageQryExe;
import com.xunhong.erp.turbo.biz.app.executor.query.DealerPaymentAccountShowQryExe;
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 = DealerPaymentAccountServiceI.class, version = "1.0.0")
@RequiredArgsConstructor
public class DealerPaymentAccountServiceImpl implements DealerPaymentAccountServiceI {

	private final DealerPaymentAccountCreateCmdExe dealerPaymentAccountCreateCmdExe;
	private final DealerPaymentAccountUpdateCmdExe dealerPaymentAccountUpdateCmdExe;
	private final DealerPaymentAccountPageQryExe dealerPaymentAccountPageQryExe;
	private final DealerPaymentAccountListQryExe dealerPaymentAccountListQryExe;
	private final DealerPaymentAccountShowQryExe dealerPaymentAccountShowQryExe;
	private final DealerPaymentAccountDestroyCmdExe dealerPaymentAccountDestroyCmdExe;

	@Override
	public DealerPaymentAccountVO create(DealerPaymentAccountCreateCmd dealerPaymentAccountCreateCmd) {
		return dealerPaymentAccountCreateCmdExe.execute(dealerPaymentAccountCreateCmd);
	}

	@Override
	public PageDTO<DealerPaymentAccountVO> page(DealerPaymentAccountPageQry dealerPaymentAccountPageQry) {
		return PageDTO.of(dealerPaymentAccountPageQryExe.execute(dealerPaymentAccountPageQry));
	}

	@Override
	public List<DealerPaymentAccountVO> list(DealerPaymentAccountListQry dealerPaymentAccountListQry) {
		return dealerPaymentAccountListQryExe.execute(dealerPaymentAccountListQry);
	}

	@Override
	public DealerPaymentAccountVO update(DealerPaymentAccountUpdateCmd dealerPaymentAccountUpdateCmd) {
		return dealerPaymentAccountUpdateCmdExe.execute(dealerPaymentAccountUpdateCmd);
	}

	@Override
	public DealerPaymentAccountVO show(DealerPaymentAccountShowQry dealerPaymentAccountShowQry) {
		return dealerPaymentAccountShowQryExe.execute(dealerPaymentAccountShowQry);
	}

	@Override
	public void destroy(DealerPaymentAccountDestroyCmd dealerPaymentAccountDestroyCmd) {
		dealerPaymentAccountDestroyCmdExe.execute(dealerPaymentAccountDestroyCmd);
	}
}

