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.so.CmdInfoSO;
import com.skr.mdm.bean.vo.equipment.SendCmdMessageInfoVO;
import com.skr.mdm.entity.DeviceInstructUserStatusDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 丢失-找回-淘汰表(DeviceInstructUserStatus)表数据库访问层
 *
 * @author nfq
 * @since 2020-08-04 14:30:38
 */
@Repository
public interface DeviceInstructUserStatusDao extends BaseMapper<DeviceInstructUserStatusDO> {

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

	List<SendCmdMessageInfoVO> selectSendInfoList(CmdQO cmdMessageBO);

	void insertInstructUserStatusList(InstructMessageBO instructMessageBO);

	/**
	 * 设备找回
	 * @param equipmentId
	 * @param cmdType
	 * @return
	 */
	List<CmdInfoSO> listRetrieveByEquipmentId(@Param("equipmentId") Integer equipmentId, @Param("cmdType") Integer cmdType, @Param("state") Integer state);
}