package cn.superdesk.uniorder.dubbo.provider.thirdpart.szhtxx.paperInvoice;

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.thirdpart.szhtxx.paperInvoice.SzhtxxPaperInvoiceRedTaxInfo;
import cn.superdesk.uniorder.dto.param.thirdpart.szhtxx.paperInvoice.SzhtxxPaperInvoiceRedTaxInfoParam;
import cn.superdesk.uniorder.dto.param.thirdpart.szhtxx.paperInvoice.SzhtxxPaperInvoiceRedTaxInfoQueryCriteria;
import cn.superdesk.uniorder.dto.vo.thirdpart.szhtxx.paperInvoice.SzhtxxPaperInvoiceRedTaxInfoListItemVo;
import cn.superdesk.uniorder.dubbo.facade.thirdpart.szhtxx.paperInvoice.DubboSzhtxxPaperInvoiceRedTaxInfoService;
import cn.superdesk.uniorder.service.thirdpart.szhtxx.paperInvoice.SzhtxxPaperInvoiceRedTaxInfoService;
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-05-25 18:50:54
 * @UpdateUser: linjinyu
 * @UpdateDate: 2022-05-25 18:50:54
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Service(version = "1.0.0", retries = -1, timeout = 10000)
public class DubboSzhtxxPaperInvoiceRedTaxInfoServiceImpl implements DubboSzhtxxPaperInvoiceRedTaxInfoService {

    @Autowired
    private SzhtxxPaperInvoiceRedTaxInfoService szhtxxPaperInvoiceRedTaxInfoService;


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

    @Override
    public int insertSelective(SzhtxxPaperInvoiceRedTaxInfo entity) {

        return szhtxxPaperInvoiceRedTaxInfoService.insertSelective(entity);
    }

    @Override
    public int updateByPrimaryKeySelective(SzhtxxPaperInvoiceRedTaxInfo entity) {

        return szhtxxPaperInvoiceRedTaxInfoService.updateByPrimaryKeySelective(entity);
    }

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

    @Override
    public SzhtxxPaperInvoiceRedTaxInfo findById(Long id) {
        return szhtxxPaperInvoiceRedTaxInfoService.findById(id);
    }

    public SzhtxxPaperInvoiceRedTaxInfo findByRedTaxInfoSn(String redTaxInfoSn) {
        return szhtxxPaperInvoiceRedTaxInfoService.findByRedTaxInfoSn(redTaxInfoSn);
    }

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

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

        return szhtxxPaperInvoiceRedTaxInfoService.findAll(queryMap);
    }

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


    @Override
    public int addSzhtxxPaperInvoiceRedTaxInfo(SzhtxxPaperInvoiceRedTaxInfoParam param) {

        SzhtxxPaperInvoiceRedTaxInfo szhtxxPaperInvoiceRedTaxInfo = AnBeanUtils.copy(param, SzhtxxPaperInvoiceRedTaxInfo.class);
        return szhtxxPaperInvoiceRedTaxInfoService.addSzhtxxPaperInvoiceRedTaxInfo(szhtxxPaperInvoiceRedTaxInfo);
    }

    @Override
    public int saveOrUpdateSzhtxxPaperInvoiceRedTaxInfo(SzhtxxPaperInvoiceRedTaxInfoParam param, LoginSysUser loginSysUser) {

        return szhtxxPaperInvoiceRedTaxInfoService.saveOrUpdateSzhtxxPaperInvoiceRedTaxInfoParam(param,loginSysUser);

    }

    @Override
    public int updateSzhtxxPaperInvoiceRedTaxInfo(SzhtxxPaperInvoiceRedTaxInfoParam param) {

        SzhtxxPaperInvoiceRedTaxInfo szhtxxPaperInvoiceRedTaxInfo = AnBeanUtils.copy(param, SzhtxxPaperInvoiceRedTaxInfo.class);
        return szhtxxPaperInvoiceRedTaxInfoService.updateSzhtxxPaperInvoiceRedTaxInfo(szhtxxPaperInvoiceRedTaxInfo);
    }

    @Override
    public int deleteSzhtxxPaperInvoiceRedTaxInfo(Long id) {
        return szhtxxPaperInvoiceRedTaxInfoService.deleteSzhtxxPaperInvoiceRedTaxInfo(id);
    }

    @Override
    public SzhtxxPaperInvoiceRedTaxInfo findSzhtxxPaperInvoiceRedTaxInfoById(Long id) {
        return szhtxxPaperInvoiceRedTaxInfoService.findSzhtxxPaperInvoiceRedTaxInfoById(id);
    }

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

    @Override
    public R<List<SzhtxxPaperInvoiceRedTaxInfoListItemVo>> pageQueryGenericParam(SzhtxxPaperInvoiceRedTaxInfoQueryCriteria criteria) {
        return szhtxxPaperInvoiceRedTaxInfoService.pageQueryGenericParam(criteria);
    }
}
