package com.skr.mdm.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.skr.mdm.bean.qo.controller.LargeScreenQO;
import com.skr.mdm.bean.vo.strategy.StrategyUserVO;
import com.skr.mdm.entity.AppStrategyUserDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AppStrategyUserDao extends BaseMapper<AppStrategyUserDO> {

    /**
     * 根据设备ID删除
     *
     * @param equipmentIdList 设备ID集合
     */
    void deleteByEquipmentIdList(@Param("equipmentIdList") List<Integer> equipmentIdList);

    List<Integer> listEquipmentIdByStrategyIds(@Param("list") List<Integer> strategyIds);


    List<Integer> queryAppStrategyStatisticsList(LargeScreenQO largeScreenQO);

    List<StrategyUserVO> listStrategyUser(@Param("strategyId") Integer strategyId,
                                          @Param("searchType") Integer searchType,
                                          @Param("searchValue") String searchValue);

    void insertBatch(@Param("list") List<AppStrategyUserDO> list);
}