package cn.superdesk.uniorder.dubbo.provider.invoice.common;

import cn.superdesk.uniorder.common.numerical.AnBeanUtils;
import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.common.security.dto.LoginSysUser;
import cn.superdesk.uniorder.dao.entity.invoice.common.InvoiceTypeModeConfigOffLine;
import cn.superdesk.uniorder.dto.param.invoice.common.InvoiceTypeModeConfigOffLineParam;
import cn.superdesk.uniorder.dto.param.invoice.common.InvoiceTypeModeConfigOffLineQueryCriteria;
import cn.superdesk.uniorder.dubbo.facade.invoice.common.DubboInvoiceTypeModeConfigOffLineService;
import cn.superdesk.uniorder.service.invoice.common.InvoiceTypeModeConfigOffLineService;
import com.alibaba.dubbo.config.annotation.Service;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

/**
 * @Description:
 * @Author: linjinyu
 * @Email linjinyu@avic-s.com
 * @CreateDate: 2022-02-10 17:46:12
 * @UpdateUser: linjinyu
 * @UpdateDate: 2022-02-10 17:46:12
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Service(version = "1.0.0", retries = -1, timeout = 10000)
public class DubboInvoiceTypeModeConfigOffLineServiceImpl implements DubboInvoiceTypeModeConfigOffLineService {

	@Autowired
	private InvoiceTypeModeConfigOffLineService invoiceTypeModeConfigOffLineService;


	/****************************************** extends BaseService 部分 start ******************************************/

	@Override
	public void addObj(InvoiceTypeModeConfigOffLineParam param) {

		InvoiceTypeModeConfigOffLine invoiceTypeModeConfigOffLine = AnBeanUtils.copy(param, InvoiceTypeModeConfigOffLine.class);
		invoiceTypeModeConfigOffLineService.addObj(invoiceTypeModeConfigOffLine);

	}

	@Override
	public void updateObj(InvoiceTypeModeConfigOffLineParam param) {

		InvoiceTypeModeConfigOffLine invoiceTypeModeConfigOffLine = AnBeanUtils.copy(param, InvoiceTypeModeConfigOffLine.class);
		invoiceTypeModeConfigOffLineService.updateObj(invoiceTypeModeConfigOffLine);
	}

	@Override
	public void deleteObj(Long id) {
		invoiceTypeModeConfigOffLineService.deleteObj(id);
	}

	@Override
	public InvoiceTypeModeConfigOffLine findById(Long id) {
		return invoiceTypeModeConfigOffLineService.findById(id);
	}

	@Override
	public PageInfo<InvoiceTypeModeConfigOffLine> findByPaging(Map<String, Object> conditions, Integer pageNun, Integer pageSize) {
		return invoiceTypeModeConfigOffLineService.findByPaging(conditions, pageNun, pageSize);
	}

	@Override
	public List<InvoiceTypeModeConfigOffLine> findAll(Map<String, Object> queryMap) {

		return invoiceTypeModeConfigOffLineService.findAll(queryMap);
	}

	/****************************************** extends BaseService 部分   end ******************************************/


	@Override
	public void addInvoiceTypeModeConfigOffLine(InvoiceTypeModeConfigOffLineParam param, LoginSysUser loginSysUser) {

		InvoiceTypeModeConfigOffLine invoiceTypeModeConfigOffLine = AnBeanUtils.copy(param, InvoiceTypeModeConfigOffLine.class);
		invoiceTypeModeConfigOffLineService.addInvoiceTypeModeConfigOffLine(invoiceTypeModeConfigOffLine, loginSysUser);
	}

	@Override
	public void updateInvoiceTypeModeConfigOffLine(InvoiceTypeModeConfigOffLineParam param, LoginSysUser loginSysUser) {

		InvoiceTypeModeConfigOffLine invoiceTypeModeConfigOffLine = AnBeanUtils.copy(param, InvoiceTypeModeConfigOffLine.class);
		invoiceTypeModeConfigOffLineService.updateInvoiceTypeModeConfigOffLine(invoiceTypeModeConfigOffLine, loginSysUser);
	}

	@Override
	public void deleteInvoiceTypeModeConfigOffLine(Long id, LoginSysUser loginSysUser) {
		invoiceTypeModeConfigOffLineService.deleteInvoiceTypeModeConfigOffLine(id, loginSysUser);
	}

	@Override
	public InvoiceTypeModeConfigOffLine findInvoiceTypeModeConfigOffLineById(Long id) {
		return invoiceTypeModeConfigOffLineService.findInvoiceTypeModeConfigOffLineById(id);
	}

	@Override
	public R<List<InvoiceTypeModeConfigOffLine>> pageQuery(Map<String, Object> conditions, int pageNun, int pageSize) {
		return invoiceTypeModeConfigOffLineService.pageQuery(conditions, pageNun, pageSize);
	}

	@Override
	public R<List<InvoiceTypeModeConfigOffLine>> pageQueryGenericParam(InvoiceTypeModeConfigOffLineQueryCriteria criteria) {
		return invoiceTypeModeConfigOffLineService.pageQueryGenericParam(criteria);
	}
}
