package com.atguigu.ssyx.activity.mapper;

import com.atguigu.ssyx.model.activity.ActivityInfo;
import com.atguigu.ssyx.model.activity.ActivityRule;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import feign.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 活动表 Mapper 接口
 * </p>
 *
 * @author atguigu
 * @since 2023-09-17
 */
@Repository
public interface ActivityInfoMapper extends BaseMapper<ActivityInfo> {

    /**
     * 查询两张表判断 activity_info 和 activity_sku，编写SQL语句实现
     *
     * @param skuIdList
     * @return
     */
    List<Long> selectSkuIdListExist(@Param("skuIdList") List<Long> skuIdList);

    /**
     * 根据skuId进行查询，查询sku对应活动里面规则列表
     *
     * @param skuId
     * @return
     */
    List<ActivityRule> findActivityRule(Long skuId);
}
