package com.buy507.mall.portal.service;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.buy507.mall.common.api.CommonResult;
import com.buy507.mall.model.UmsMemberReceiveAddress;
import com.buy507.mall.portal.domain.AreaOptions;

/**
 * 用户地址管理Service
 */
public interface UmsMemberReceiveAddressService {
    /**
     * 添加收货地址
     */
	@Transactional
	CommonResult add(UmsMemberReceiveAddress address);
    
    /**
     * 删除收货地址
     * @param id 地址表的id
     */
	CommonResult delete(Long id);

    /**
     * 修改收货地址
     * @param id 地址表的id
     * @param address 修改的收货地址信息
     */
	@Transactional
	CommonResult update(Long id, UmsMemberReceiveAddress address);

    /**
     * 返回当前用户的收货地址
     */
    List<UmsMemberReceiveAddress> list();
    
    UmsMemberReceiveAddress getDefaultReceivingAddress();
    /**
     * 获取地址详情
     * @param id 地址id
     */
    UmsMemberReceiveAddress get(Long id);
    
    List<AreaOptions> getAllArea();
}
