package com.skr.mdm.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.skr.mdm.bean.vo.system.ClientUpgradeUserVO;
import com.skr.mdm.entity.ClientUpgradeUserDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * (ClientUpgradeUser)表数据库访问层
 *
 * @author nfq
 * @since 2020-08-03 18:01:14
 */
@Repository
public interface ClientUpgradeUserDao extends BaseMapper<ClientUpgradeUserDO> {

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

    List<ClientUpgradeUserVO> listClientUpgradeUserVO(@Param("clientUpgradeId") Integer clientUpgradeId,
                                                      @Param("searchType") Integer searchType,
                                                      @Param("searchValue") String searchValue);

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

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

    List<Integer> listUserState(@Param("clientUpgradeId") Integer clientUpgradeId);
}