package com.jkcredit.invoice.mapper.customer;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jkcredit.invoice.model.entity.customer.CustomerRec;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CustomerRecMapper extends BaseMapper<CustomerRec> {
    int deleteByPrimaryKey(Integer id);

    int insert(CustomerRec record);

    int insertSelective(CustomerRec record);

    CustomerRec selectByPrimaryKey(Integer id);
    CustomerRec selectByPrimaryKeyHasBase64(Integer id);
    List<CustomerRec> selectByCustomerName(String customerName);

    CustomerRec selectByCustomerNameAndCompany(CustomerRec record);
    CustomerRec selectByCustomerNameAndCompanyConcat(CustomerRec record);

    int updateByPrimaryKeySelective(CustomerRec record);

    int updateByPrimaryKey(CustomerRec record);
    IPage<List<CustomerRec>> selectAllByPage(Page page, @Param("customerRec") CustomerRec customerRec);
}