package com.fuyuanshen.customer.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuyuanshen.customer.domain.Customer;
import com.fuyuanshen.customer.domain.query.UserQueryCriteria;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: 默苍璃
 * @date: 2025-07-0114:37
 */
@Mapper
public interface CustomerMapper extends BaseMapper<Customer> {

    /**
     * 分页查询客户
     *
     * @param criteria
     * @return
     */
    List<Customer> findCustomers(@Param("criteria") UserQueryCriteria criteria);

    /**
     * 获取分页总数
     *
     * @param criteria
     * @return
     */
    Long countCustomers(@Param("criteria") UserQueryCriteria criteria);


    /**
     * 查询所有客户
     *
     * @param criteria
     * @return
     */
    List<Customer> queryAllCustomers(@Param("criteria") UserQueryCriteria criteria);

    /**
     * 根据条件查询客户
     *
     * @param criteria
     * @return
     */
    List<Customer> queryCustomers(@Param("criteria") UserQueryCriteria criteria);

    /**
     * 根据id查询客户
     *
     * @param customerId
     * @return
     */
    Customer queryCustomerById(@Param("customerId") Long customerId, @Param("pid") Long pid);


}
