package com.ruoyi.mall.service;

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

import com.ruoyi.common.utils.ApiResult;
import com.ruoyi.mall.domain.MallMemberAddress;
import com.ruoyi.mall.domain.vo.MemberAddressVO;

/**
 * 收货地址Service接口
 *
 * @author chang
 * @date 2021-11-25
 */
public interface IMallMemberAddressService
{
    /**
     * 查询收货地址
     *
     * @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);
    int add(Map<String, Object> map);
    int change(Map<String, Object> map);
    ApiResult toDefault(Map<String, Object> map);
    /**
     * 新增收货地址
     *
     * @param mallMemberAddress 收货地址
     * @return 结果
     */
    public int insertMallMemberAddress(MallMemberAddress mallMemberAddress);

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

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

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

    public MemberAddressVO selectMallMemberAddressVOById(long l);

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

    public MemberAddressVO getDefaultVO(Long userId);
}
