package com.ruoyi.mall.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.mall.domain.MallMemberAddress;
import com.ruoyi.mall.domain.vo.MemberAddressVO;

/**
 * 收货地址Mapper接口
 *
 * @author chang
 * @date 2021-11-25
 */
public interface MallMemberAddressMapper
{
    /**
     * 查询收货地址
     *
     * @param id 收货地址主键
     * @return 收货地址
     */
    public MallMemberAddress selectMallMemberAddressById(Long id);

    public MallMemberAddress getDefault(String userId);
    /**
     * 查询收货地址列表
     *
     * @param mallMemberAddress 收货地址
     * @return 收货地址集合
     */
    public List<MallMemberAddress> selectMallMemberAddressList(MallMemberAddress mallMemberAddress);
    List<MallMemberAddress> queryByUserId(Map<String, Object> map);

    /**
     * 新增收货地址
     *
     * @param mallMemberAddress 收货地址
     * @return 结果
     */
    public int insertMallMemberAddress(MallMemberAddress mallMemberAddress);

    int removeDefault(String userId);

    /**
     * 修改收货地址
     *
     * @param mallMemberAddress 收货地址
     * @return 结果
     */
    public int updateMallMemberAddress(MallMemberAddress mallMemberAddress);

    /**
     * 删除收货地址
     *
     * @param id 收货地址主键
     * @return 结果
     */
    public int deleteMallMemberAddressById(Long id);

    public int removeMallMemberAddressById(Long id);

    /**
     * 批量删除收货地址
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMallMemberAddressByIds(Long[] ids);

    public MemberAddressVO selectMallMemberAddressVOById(long l);

    public List<MemberAddressVO> queryAddressVOByUserId(Map<String, Object> params);

    public MemberAddressVO getDefaultVO(Long userId);
}
