package com.yc.ship.module.trade.service.order.impl;

import com.yc.ship.module.trade.dal.dataobject.order.TradeVisitorDO;
import com.yc.ship.module.trade.dal.mysql.order.TradeVisitorMapper;
import com.yc.ship.module.trade.service.order.TradeVisitorService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

/**
 * 游客数据
 */
@Slf4j
@Service
@Validated
@RequiredArgsConstructor
public class TradeVisitorServiceImpl implements TradeVisitorService {

    @Resource
    private TradeVisitorMapper tradeVisitorMapper;
    @Override
    public List<TradeVisitorDO> getShipByOrderIds(List<Long> orderIds) {
        if(orderIds.isEmpty()) {
            return Collections.emptyList();
        }
        return tradeVisitorMapper.selectShipByOrderIds(orderIds);
    }
}
