package com.ylx.address.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ylx.address.domain.TAddress;
import com.ylx.massage.domain.vo.MerchantCurrentAddressVO;
import com.ylx.massage.domain.vo.UserAddressListVO;
import com.ylx.address.domain.dto.UserAddressAddDto;
import com.ylx.address.domain.dto.UserAddressDeleteDto;
import com.ylx.address.domain.dto.UserAddressDto;
import com.ylx.address.domain.dto.UserAddressUpdateDto;
import com.ylx.address.domain.vo.UserAddressVo;

import java.util.List;

/**
 * 轮播图(TAddress)表服务接口
 *
 * @author makejava
 * @since 2024-04-11 17:18:53
 */
public interface TAddressService extends IService<TAddress> {

    /**
     * 获取默认地址
     * @param openId
     * @return
     */
    public TAddress getByOpenId(String openId);

    /**
     * 根据openId,userType查询地址列表
     * @param dto
     * @return
     */
    public List<UserAddressVo> getByOpenIdList(UserAddressDto dto);

    /**
     * PC user address list.
     *
     * @param openId user openId
     * @return address list
     */
    List<UserAddressListVO> getPcUserAddressList(String openId);

    /**
     * 查询商户当前真实地址。
     *
     * @param merchantId 商户ID
     * @return 商户当前真实地址
     */
    MerchantCurrentAddressVO getCurrentMerchantAddress(Integer merchantId);

    Boolean defaultAddress(TAddress tAddress);

    Object insertAddress(TAddress tAddress);

     /**
     * 新增虚拟地址
     * @param tAddress
     * @return
     */
    Object insertVirtualAddress(TAddress tAddress);

    Object updateAddress(TAddress tAddress);

    /**
     * 新增地址
     * @param dto
     */
    void addUserAddress(UserAddressAddDto dto);

    void updateUserAddress(UserAddressUpdateDto dto);

    void deleteUserAddress(UserAddressDeleteDto dto);
}

