package co.yixiang.yshop.module.product.service.campaigndetail;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

import org.springframework.validation.annotation.Validated;

import java.util.*;

import co.yixiang.yshop.module.product.dal.dataobject.campaigndetail.CampaignDetailDO;
import co.yixiang.yshop.module.product.dal.mysql.campaigndetail.CampaignDetailMapper;


/**
 * 营销活动明细 Service 实现类
 *
 * @author moxiangrong
 */
@Service
@Validated
public class CampaignDetailServiceImpl implements CampaignDetailService {

    @Resource
    private CampaignDetailMapper campaignDetailMapper;

    @Override
    public List<CampaignDetailDO> getCampaignDetailListByProductIds(List<Long> ids) {
        return campaignDetailMapper.selectList(new LambdaQueryWrapper<CampaignDetailDO>()
                .in(CampaignDetailDO::getProductId, ids));
    }

}
