package net.lab1024.sa.admin.module.business.wms.base.address.service;


import java.util.List;

import net.lab1024.sa.admin.module.business.wms.base.address.domain.entity.AddressEntity;
import net.lab1024.sa.admin.module.business.wms.base.address.domain.form.AddressAddForm;
import net.lab1024.sa.admin.module.business.wms.base.address.domain.form.AddressUpdateForm;
import net.lab1024.sa.base.common.domain.ResponseDTO;
import org.springframework.web.multipart.MultipartFile;

/**
 * 收货地址 Service
 *
 * @author hj
 * @since 2024-12-26 15:35:23
 * copyright 友仓
 */

public interface AddressService {

    /**
     * 添加
     *
     * @param addForm 添加参数
     * @return ResponseDTO<String>
     */
    ResponseDTO<String> add(AddressAddForm addForm);

    /**
     * 更新
     *
     * @param updateForm 更新参数
     * @return ResponseDTO<String>
     */
    ResponseDTO<String> update(AddressUpdateForm updateForm);

    /**
     * 批量删除
     *
     * @param idList 集合
     * @return ResponseDTO<String>
     */
    ResponseDTO<String> batchDelete(List<Long> idList);

    /**
     * 单个删除
     *
     * @param addressId id
     * @return ResponseDTO<String>
     */
    ResponseDTO<String> delete(Long addressId);

    /**
     * 收货地址导入
     *
     * @param file 上传文件
     * @return ResponseDTO<String>
     */
    ResponseDTO<String> importAddress(MultipartFile file);

    /**
     * 创建收货地址
     *
     * @param name      收货单位
     * @param person    联系人
     * @param telephone 电话
     * @param address   地址
     * @return AddressEntity
     */
    AddressEntity createAddress(String name, String person, String telephone, String address);
}
