package com.skr.mdm.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.skr.mdm.bean.bo.InstructMessageBO;
import com.skr.mdm.bean.qo.cmd.CmdQO;
import com.skr.mdm.bean.vo.equipment.ClientAdminCmdUserVO;
import com.skr.mdm.bean.vo.equipment.ClientAdminCmdVO;
import com.skr.mdm.bean.vo.equipment.SendCmdMessageInfoVO;
import com.skr.mdm.entity.DeviceInstructLockscreenDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 锁屏-解锁表(DeviceInstructLockscreen)表数据库访问层
 *
 * @author nfq
 * @since 2020-08-04 14:30:02
 */
@Repository
public interface DeviceInstructLockscreenDao extends BaseMapper<DeviceInstructLockscreenDO> {

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

	List<SendCmdMessageInfoVO> selectSendInfoList(CmdQO cmdMessageBO);

	void insertInstructLockScreeList(InstructMessageBO instructMessageBO);

	/**
	 * 批量插入
	 * @param list
	 */
	void insertBatch(@Param("list") List<DeviceInstructLockscreenDO> list);

	/**
	 * 管理员客户端指令列表
	 * @param companyId
	 * @param searchType
	 * @param searchValue
	 * @return
	 */
	List<ClientAdminCmdVO> listClientAdminCmd(@Param("companyId") Integer companyId, @Param("searchType") Integer searchType,
											  @Param("searchValue") String searchValue);

	/**
	 * 管理员客户端指令作用人列表
	 * @param companyId
	 * @param messageId
	 * @param searchType
	 * @param searchValue
	 * @return
	 */
	List<ClientAdminCmdUserVO> listUserClientAdminCmd(@Param("companyId") Integer companyId, @Param("messageId") String messageId,
													  @Param("searchType") Integer searchType, @Param("searchValue") String searchValue);
}