package com.skr.mdm.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.skr.mdm.bean.so.app.AppStrategyInfoSO;
import com.skr.mdm.bean.vo.app.AppStrategyConfigInfoVO;
import com.skr.mdm.entity.AppStrategyRunDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 应用策略运行黑白名单(AppStrategyRun)表数据库访问层
 *
 * @author nfq
 * @since 2022-10-24 17:38:21
 */
@Repository
public interface AppStrategyRunDao extends BaseMapper<AppStrategyRunDO> {


    /**
     * 批量新增数据（MyBatis原生foreach方法）
     *
     * @param entities List<AppStrategyRun> 实例对象列表
     * @return 影响行数
     */
    int insertBatch(@Param("entities") List<AppStrategyRunDO> entities);

    /**
     * 获取应用运行黑白名单VO
     * @param strategyId
     * @return
     */
    AppStrategyConfigInfoVO getAppStrategyConfigInfoVO(Integer strategyId);

    /**
     * 获取应用运行黑白名单SO
     * @param strategyId
     * @return
     */
    AppStrategyInfoSO getAppStrategyInfoSO(Integer strategyId);

}

