package cn.reghao.tnb.content.app.mall.service;

import cn.reghao.tnb.content.app.mall.db.mapper.DeliveryMapper;
import cn.reghao.tnb.content.app.mall.model.po.Delivery;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author reghao
 * @date 2024-04-26 11:43:53
 */
@Service
public class DeliveryService {
    private final DeliveryMapper deliveryMapper;

    public DeliveryService(DeliveryMapper deliveryMapper) {
        this.deliveryMapper = deliveryMapper;
    }

    public List<Delivery> getUserAddresses(long userId) {
        return deliveryMapper.findByOwner(userId);
    }
}
