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.InvoiceTypeModeConfigSzhtxxElectronicInvoice;
import cn.superdesk.uniorder.dto.param.invoice.common.InvoiceTypeModeConfigSzhtxxElectronicInvoiceParam;
import cn.superdesk.uniorder.dto.param.invoice.common.InvoiceTypeModeConfigSzhtxxElectronicInvoiceQueryCriteria;
import cn.superdesk.uniorder.dubbo.facade.invoice.common.DubboInvoiceTypeModeConfigSzhtxxElectronicInvoiceService;
import cn.superdesk.uniorder.service.invoice.common.InvoiceTypeModeConfigSzhtxxElectronicInvoiceService;
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 DubboInvoiceTypeModeConfigSzhtxxElectronicInvoiceServiceImpl implements DubboInvoiceTypeModeConfigSzhtxxElectronicInvoiceService {

	@Autowired
	private InvoiceTypeModeConfigSzhtxxElectronicInvoiceService invoiceTypeModeConfigSzhtxxElectronicInvoiceService;


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

	@Override
	public void addObj(InvoiceTypeModeConfigSzhtxxElectronicInvoiceParam param) {

		InvoiceTypeModeConfigSzhtxxElectronicInvoice invoiceTypeModeConfigSzhtxxElectronicInvoice = AnBeanUtils.copy(param, InvoiceTypeModeConfigSzhtxxElectronicInvoice.class);
		invoiceTypeModeConfigSzhtxxElectronicInvoiceService.addObj(invoiceTypeModeConfigSzhtxxElectronicInvoice);

	}

	@Override
	public void updateObj(InvoiceTypeModeConfigSzhtxxElectronicInvoiceParam param) {

		InvoiceTypeModeConfigSzhtxxElectronicInvoice invoiceTypeModeConfigSzhtxxElectronicInvoice = AnBeanUtils.copy(param, InvoiceTypeModeConfigSzhtxxElectronicInvoice.class);
		invoiceTypeModeConfigSzhtxxElectronicInvoiceService.updateObj(invoiceTypeModeConfigSzhtxxElectronicInvoice);
	}

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

	@Override
	public InvoiceTypeModeConfigSzhtxxElectronicInvoice findById(Long id) {
		return invoiceTypeModeConfigSzhtxxElectronicInvoiceService.findById(id);
	}

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

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

		return invoiceTypeModeConfigSzhtxxElectronicInvoiceService.findAll(queryMap);
	}

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


	@Override
	public int addInvoiceTypeModeConfigSzhtxxElectronicInvoice(InvoiceTypeModeConfigSzhtxxElectronicInvoiceParam param, LoginSysUser loginSysUser) {

		InvoiceTypeModeConfigSzhtxxElectronicInvoice invoiceTypeModeConfigSzhtxxElectronicInvoice = AnBeanUtils.copy(param, InvoiceTypeModeConfigSzhtxxElectronicInvoice.class);
		return invoiceTypeModeConfigSzhtxxElectronicInvoiceService.addInvoiceTypeModeConfigSzhtxxElectronicInvoice(invoiceTypeModeConfigSzhtxxElectronicInvoice, loginSysUser);
	}

	@Override
	public int updateInvoiceTypeModeConfigSzhtxxElectronicInvoice(InvoiceTypeModeConfigSzhtxxElectronicInvoiceParam param, LoginSysUser loginSysUser) {

		InvoiceTypeModeConfigSzhtxxElectronicInvoice invoiceTypeModeConfigSzhtxxElectronicInvoice = AnBeanUtils.copy(param, InvoiceTypeModeConfigSzhtxxElectronicInvoice.class);
		return invoiceTypeModeConfigSzhtxxElectronicInvoiceService.updateInvoiceTypeModeConfigSzhtxxElectronicInvoice(invoiceTypeModeConfigSzhtxxElectronicInvoice, loginSysUser);
	}

	@Override
	public int deleteInvoiceTypeModeConfigSzhtxxElectronicInvoice(Long id, LoginSysUser loginSysUser) {
		return invoiceTypeModeConfigSzhtxxElectronicInvoiceService.deleteInvoiceTypeModeConfigSzhtxxElectronicInvoice(id, loginSysUser);
	}

	@Override
	public InvoiceTypeModeConfigSzhtxxElectronicInvoice findInvoiceTypeModeConfigSzhtxxElectronicInvoiceById(Long id) {
		return invoiceTypeModeConfigSzhtxxElectronicInvoiceService.findInvoiceTypeModeConfigSzhtxxElectronicInvoiceById(id);
	}

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

	@Override
	public R<List<InvoiceTypeModeConfigSzhtxxElectronicInvoice>> pageQueryGenericParam(InvoiceTypeModeConfigSzhtxxElectronicInvoiceQueryCriteria criteria) {
		return invoiceTypeModeConfigSzhtxxElectronicInvoiceService.pageQueryGenericParam(criteria);
	}
}
