package cn.superdesk.uniorder.service.operationCenter.impl;

import cn.superdesk.uniorder.dao.entity.operationCenter.UnifiedCustomerInvoiceTitle;
import cn.superdesk.uniorder.dao.mapper.operationCenter.UnifiedBillStartMapper;
import cn.superdesk.uniorder.dto.param.operationCenter.base.OperationCenterBaseParam;
import cn.superdesk.uniorder.dto.vo.operationCenter.customer.OperationCenterBillStartVo;
import cn.superdesk.uniorder.service.operationCenter.OperationCenterBillStartService;
import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

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

/**
 * @Author : zx
 * @Create : 2023/4/17 14:51
 * Description :
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class OperationCenterBillStartServiceImpl implements OperationCenterBillStartService {
    private final UnifiedBillStartMapper unifiedBillStartMapper;
    @Override
    public int insertSelective(UnifiedCustomerInvoiceTitle unifiedCustomerInvoiceTitle) {
        return unifiedBillStartMapper.insertSelective(unifiedCustomerInvoiceTitle);
    }

    @Override
    public int updateByPrimaryKeySelective(UnifiedCustomerInvoiceTitle unifiedCustomerInvoiceTitle) {
        return unifiedBillStartMapper.updateByPrimaryKeySelective(unifiedCustomerInvoiceTitle);
    }

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

    @Override
    public UnifiedCustomerInvoiceTitle findById(Long id) {
        return unifiedBillStartMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<UnifiedCustomerInvoiceTitle> findAll(Map<String, Object> queryMap) {
        return null;
    }

    @Override
    public PageInfo<UnifiedCustomerInvoiceTitle> findByPaging(Map<String, Object> params, Integer pageNo, Integer pageSize) {
        return null;
    }

    @Override
    public List<OperationCenterBillStartVo> getBillStartListByCustomerId(OperationCenterBaseParam param) {
        return unifiedBillStartMapper.getBillStartListByCustomerId(param);
    }

    @Override
    public int countBillStartByCustomerId(Long customerId) {
        return unifiedBillStartMapper.countBillStartByCustomerId(customerId);
    }

    @Override
    public UnifiedCustomerInvoiceTitle getUnifiedBillStartById(Long billId) {
        return unifiedBillStartMapper.getUnifiedBillStartById(billId);
    }

    @Override
    public void updateBillStartIsDefault(Map<String, Object> conditions) {
        unifiedBillStartMapper.updateBillStartIsDefault(conditions);
    }
}
