
package com.tmerclub.cloud.user.mapper;

import com.tmerclub.cloud.user.model.PopupRelate;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 弹窗广告关联
 * @author TRACK
 */
public interface PopupRelateMapper {

    /**
     * 根据弹窗广告关联id获取弹窗广告关联
     * @param popupId 弹窗广告id
     * @return 弹窗广告关联
     */
    List<PopupRelate> getByPopupId(@Param("popupId") Long popupId);

    /**
     * 批量保存
     * @param popupRelates 弹窗广告关联
     */
    void saveBatch(@Param("popupRelates") List<PopupRelate> popupRelates);

    /**
     * 根据弹窗广告id删除弹窗广告关联
     * @param popupId id
     */
    void deleteById(@Param("popupId") Long popupId);

    /**
     * 根据弹窗广告关联id删除弹窗广告关联
     * @param relateIds
     */
    void deleteByRelateIds(@Param("relateIds") List<Long> relateIds);
}
