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.InvoiceTypeModeConfigSzhtxxPaperInvoice;
import cn.superdesk.uniorder.dto.param.invoice.common.InvoiceTypeModeConfigSzhtxxPaperInvoiceParam;
import cn.superdesk.uniorder.dto.param.invoice.common.InvoiceTypeModeConfigSzhtxxPaperInvoiceQueryCriteria;
import cn.superdesk.uniorder.dubbo.facade.invoice.common.DubboInvoiceTypeModeConfigSzhtxxPaperInvoiceService;
import cn.superdesk.uniorder.service.invoice.common.InvoiceTypeModeConfigSzhtxxPaperInvoiceService;
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-04-22 10:22:57
 * @UpdateUser: linjinyu
 * @UpdateDate: 2022-04-22 10:22:57
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Service(version = "1.0.0", retries = -1, timeout = 10000)
public class DubboInvoiceTypeModeConfigSzhtxxPaperInvoiceServiceImpl implements DubboInvoiceTypeModeConfigSzhtxxPaperInvoiceService {

    @Autowired
    private InvoiceTypeModeConfigSzhtxxPaperInvoiceService invoiceTypeModeConfigSzhtxxPaperInvoiceService;


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

    @Override
    public void addObj(InvoiceTypeModeConfigSzhtxxPaperInvoiceParam param) {

        InvoiceTypeModeConfigSzhtxxPaperInvoice invoiceTypeModeConfigSzhtxxPaperInvoice = AnBeanUtils.copy(param, InvoiceTypeModeConfigSzhtxxPaperInvoice.class);
        invoiceTypeModeConfigSzhtxxPaperInvoiceService.insertSelective(invoiceTypeModeConfigSzhtxxPaperInvoice);

    }

    @Override
    public void updateObj(InvoiceTypeModeConfigSzhtxxPaperInvoiceParam param) {

        InvoiceTypeModeConfigSzhtxxPaperInvoice invoiceTypeModeConfigSzhtxxPaperInvoice = AnBeanUtils.copy(param, InvoiceTypeModeConfigSzhtxxPaperInvoice.class);
        invoiceTypeModeConfigSzhtxxPaperInvoiceService.updateByPrimaryKeySelective(invoiceTypeModeConfigSzhtxxPaperInvoice);
    }

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

    @Override
    public InvoiceTypeModeConfigSzhtxxPaperInvoice findById(Long id) {
        return invoiceTypeModeConfigSzhtxxPaperInvoiceService.findById(id);
    }

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

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

        return invoiceTypeModeConfigSzhtxxPaperInvoiceService.findAll(queryMap);
    }

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


    @Override
    public int addInvoiceTypeModeConfigSzhtxxPaperInvoice(InvoiceTypeModeConfigSzhtxxPaperInvoiceParam param, LoginSysUser loginSysUser) {

        InvoiceTypeModeConfigSzhtxxPaperInvoice invoiceTypeModeConfigSzhtxxPaperInvoice = AnBeanUtils.copy(param, InvoiceTypeModeConfigSzhtxxPaperInvoice.class);
        return invoiceTypeModeConfigSzhtxxPaperInvoiceService.addInvoiceTypeModeConfigSzhtxxPaperInvoice(invoiceTypeModeConfigSzhtxxPaperInvoice, loginSysUser);
    }

    @Override
    public int updateInvoiceTypeModeConfigSzhtxxPaperInvoice(InvoiceTypeModeConfigSzhtxxPaperInvoiceParam param, LoginSysUser loginSysUser) {

        InvoiceTypeModeConfigSzhtxxPaperInvoice invoiceTypeModeConfigSzhtxxPaperInvoice = AnBeanUtils.copy(param, InvoiceTypeModeConfigSzhtxxPaperInvoice.class);
        return invoiceTypeModeConfigSzhtxxPaperInvoiceService.updateInvoiceTypeModeConfigSzhtxxPaperInvoice(invoiceTypeModeConfigSzhtxxPaperInvoice, loginSysUser);
    }

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

    @Override
    public InvoiceTypeModeConfigSzhtxxPaperInvoice findInvoiceTypeModeConfigSzhtxxPaperInvoiceById(Long id) {
        return invoiceTypeModeConfigSzhtxxPaperInvoiceService.findInvoiceTypeModeConfigSzhtxxPaperInvoiceById(id);
    }

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

    @Override
    public R<List<InvoiceTypeModeConfigSzhtxxPaperInvoice>> pageQueryGenericParam(InvoiceTypeModeConfigSzhtxxPaperInvoiceQueryCriteria criteria) {
        return invoiceTypeModeConfigSzhtxxPaperInvoiceService.pageQueryGenericParam(criteria);
    }
}
