package com.dxhy.core.service.singletable.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.dxhy.common.constant.DbConstant;
import com.dxhy.common.datasource.config.DynamicContextHolder;
import com.dxhy.common.service.impl.MpBaseServiceImpl;
import com.dxhy.core.dao.TDxRecordInvoiceDetailDao;
import com.dxhy.core.job.entity.TDxRecordInvoiceDetail;
import com.dxhy.core.job.entity.TDxVehicleSaleInvoice;
import com.dxhy.core.service.singletable.IInvoiceDetail;

/**
 * 底账明细表业务实现类
 *
 * @author user
 */
@Service("invoiceDetail")
public class InvoiceDetailImpl extends MpBaseServiceImpl<TDxRecordInvoiceDetailDao, TDxRecordInvoiceDetail>
    implements IInvoiceDetail {

    @Override
    public List<TDxRecordInvoiceDetail> getSalesInvoiceDetail(String dbName, String uuid) {
        DynamicContextHolder.push(dbName + DbConstant.DETAIL_READ);
        return baseMapper.getSalesInvoiceDetail(uuid);
    }

    @Override
    public TDxVehicleSaleInvoice getVehicleDetailSales(String dbName, String uuid) {
        DynamicContextHolder.push(dbName + DbConstant.BUSINESS_READ);
        return baseMapper.getVehicleDetailSales(uuid);
    }
}
