package cn.superdesk.uniorder.dubbo.consumer.thirdpart.szhtxx.electronicInvoice;

import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.common.security.JwtUtil;
import cn.superdesk.uniorder.common.security.dto.LoginSysUser;
import cn.superdesk.uniorder.dao.entity.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxExtendInfo;
import cn.superdesk.uniorder.dto.param.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxExtendInfoParam;
import cn.superdesk.uniorder.dto.param.thirdpart.szhtxx.electronicInvoice.SzhtxxElectronicInvoiceFptxxExtendInfoQueryCriteria;
import cn.superdesk.uniorder.dubbo.facade.thirdpart.szhtxx.electronicInvoice.DubboSzhtxxElectronicInvoiceFptxxExtendInfoService;
import com.alibaba.dubbo.config.annotation.Reference;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

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

/**
 * @Description:
 * @Author: linjinyu
 * @Email linjinyu@avic-s.com
 * @CreateDate: 2022-03-17 13:52:19
 * @UpdateUser: linjinyu
 * @UpdateDate: 2022-03-17 13:52:19
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Slf4j
@Component
public class SzhtxxElectronicInvoiceFptxxExtendInfoDubboConsumerService {

    @Reference(version = "1.0.0", timeout = 30000, retries = -1)
    private DubboSzhtxxElectronicInvoiceFptxxExtendInfoService dubboSzhtxxElectronicInvoiceFptxxExtendInfoService;


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

    public int insertSelective(SzhtxxElectronicInvoiceFptxxExtendInfo entity) {

        return dubboSzhtxxElectronicInvoiceFptxxExtendInfoService.insertSelective(entity);

    }

    public int updateByPrimaryKeySelective(SzhtxxElectronicInvoiceFptxxExtendInfo entity) {
        return dubboSzhtxxElectronicInvoiceFptxxExtendInfoService.updateByPrimaryKeySelective(entity);
    }

    public void deleteObj(Long id) {

        dubboSzhtxxElectronicInvoiceFptxxExtendInfoService.deleteObj(id);
    }

    public SzhtxxElectronicInvoiceFptxxExtendInfo findById(Long id) {

        return dubboSzhtxxElectronicInvoiceFptxxExtendInfoService.findById(id);
    }

    public PageInfo<SzhtxxElectronicInvoiceFptxxExtendInfo> findByPaging(Map<String, Object> conditions, Integer pageNun, Integer pageSize) {

        return dubboSzhtxxElectronicInvoiceFptxxExtendInfoService.findByPaging(conditions, pageNun, pageSize);
    }

    public List<SzhtxxElectronicInvoiceFptxxExtendInfo> findAll(Map<String, Object> queryMap) {

        return dubboSzhtxxElectronicInvoiceFptxxExtendInfoService.findAll(queryMap);
    }

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


    public int saveOrUpdate(SzhtxxElectronicInvoiceFptxxExtendInfo entity, String token) {

        LoginSysUser loginSysUser = JwtUtil.getLoginSysUser(token);
        return dubboSzhtxxElectronicInvoiceFptxxExtendInfoService.saveOrUpdate(entity, loginSysUser);

    }

    public int addSzhtxxElectronicInvoiceFptxxExtendInfo(SzhtxxElectronicInvoiceFptxxExtendInfoParam param) {

        return dubboSzhtxxElectronicInvoiceFptxxExtendInfoService.addSzhtxxElectronicInvoiceFptxxExtendInfo(param);
    }


    public int updateSzhtxxElectronicInvoiceFptxxExtendInfo(SzhtxxElectronicInvoiceFptxxExtendInfoParam param) {

        return dubboSzhtxxElectronicInvoiceFptxxExtendInfoService.updateSzhtxxElectronicInvoiceFptxxExtendInfo(param);
    }


    public int deleteSzhtxxElectronicInvoiceFptxxExtendInfo(Long id) {
        return dubboSzhtxxElectronicInvoiceFptxxExtendInfoService.deleteSzhtxxElectronicInvoiceFptxxExtendInfo(id);
    }


    public SzhtxxElectronicInvoiceFptxxExtendInfo findSzhtxxElectronicInvoiceFptxxExtendInfoById(Long id) {

        return dubboSzhtxxElectronicInvoiceFptxxExtendInfoService.findSzhtxxElectronicInvoiceFptxxExtendInfoById(id);
    }

    public SzhtxxElectronicInvoiceFptxxExtendInfo findByFpqqlsh(String fpqqlsh) {

        return dubboSzhtxxElectronicInvoiceFptxxExtendInfoService.findByFpqqlsh(fpqqlsh);
    }


    public R<List<SzhtxxElectronicInvoiceFptxxExtendInfo>> pageQuery(Map<String, Object> conditions, int pageNun, int pageSize) {

        return dubboSzhtxxElectronicInvoiceFptxxExtendInfoService.pageQuery(conditions, pageNun, pageSize);
    }


    public R<List<SzhtxxElectronicInvoiceFptxxExtendInfo>> pageQueryGenericParam(SzhtxxElectronicInvoiceFptxxExtendInfoQueryCriteria queryCriteria) {

        return dubboSzhtxxElectronicInvoiceFptxxExtendInfoService.pageQueryGenericParam(queryCriteria);
    }
}
