/**
 * BladeX Commercial License Agreement
 * Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
 * <p>
 * Use of this software is governed by the Commercial License Agreement
 * obtained after purchasing a license from BladeX.
 * <p>
 * 1. This software is for development use only under a valid license
 * from BladeX.
 * <p>
 * 2. Redistribution of this software's source code to any third party
 * without a commercial license is strictly prohibited.
 * <p>
 * 3. Licensees may copyright their own code but cannot use segments
 * from this software for such purposes. Copyright of this software
 * remains with BladeX.
 * <p>
 * Using this software signifies agreement to this License, and the software
 * must not be used for illegal purposes.
 * <p>
 * Author: Chill Zhuang (bladejava@qq.com)
 */
package org.springblade.transport.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import org.springblade.transport.excel.CommonAddressExcel;
import org.springblade.transport.pojo.entity.CommonAddress;
import org.springblade.transport.pojo.vo.CommonAddressRemoveResultVO;
import org.springblade.transport.pojo.vo.CommonAddressVO;

import java.util.List;

/**
 * 常用地址 服务类
 *
 * @author Chill
 */
public interface ICommonAddressService extends BaseService<CommonAddress> {

	/**
	 * 自定义分页
	 *
	 * @param page 分页参数
	 * @param address 查询参数
	 * @return 常用地址分页
	 */
	IPage<CommonAddressVO> selectCommonAddressPage(IPage<CommonAddressVO> page, CommonAddressVO address);

	/**
	 * 详情
	 *
	 * @param id 主键
	 * @return 常用地址
	 */
	CommonAddressVO detail(Long id);

	/**
	 * 新增或修改
	 *
	 * @param address 常用地址
	 * @return 是否成功
	 */
	boolean submit(CommonAddress address);

	/**
	 * 删除常用地址
	 *
	 * @param ids 主键集合
	 * @return 删除结果
	 */
	CommonAddressRemoveResultVO removeAddress(String ids);

	/**
	 * 来源地址选项
	 *
	 * @param addressType 地址类型
	 * @param keyword 关键字
	 * @return 来源地址
	 */
	List<CommonAddressVO> sourceOptions(String addressType, String keyword);

	/**
	 * 导出常用地址
	 *
	 * @param queryWrapper 查询条件
	 * @return 导出数据
	 */
	List<CommonAddressExcel> exportCommonAddress(Wrapper<CommonAddress> queryWrapper);

}
