package com.erp.customer.service;

import com.erp.customer.entity.CustomerAddress;

import java.util.List;

/**
 * 客户地址Service接口
 */
public interface CustomerAddressService {
    
    /**
     * 获取客户的所有地址
     */
    List<CustomerAddress> getAddressesByCustomerId(Long customerId);
    
    /**
     * 获取客户的默认地址
     */
    CustomerAddress getDefaultAddress(Long customerId);
    
    /**
     * 根据ID获取地址
     */
    CustomerAddress getAddressById(Long id);
    
    /**
     * 创建地址
     */
    CustomerAddress createAddress(Long customerId, CustomerAddress address);
    
    /**
     * 更新地址
     */
    CustomerAddress updateAddress(Long id, CustomerAddress address);
    
    /**
     * 删除地址
     */
    void deleteAddress(Long id);
    
    /**
     * 设置为默认地址
     */
    CustomerAddress setDefaultAddress(Long id);
    
    /**
     * 获取发货地址
     */
    List<CustomerAddress> getDeliveryAddresses(Long customerId);
    
    /**
     * 根据地址类型查询
     */
    List<CustomerAddress> getAddressesByType(Long customerId, String addressType);
    
    /**
     * 统计客户地址数量
     */
    Long countAddressesByCustomerId(Long customerId);
}
