package com.zcxk.rmcp.core.dao;

import com.zcxk.core.common.pojo.UserCondition;
import com.zcxk.rmcp.api.dto.devicecommand.DeviceCommandPageDto;
import com.zcxk.rmcp.api.vo.DeviceCommandVo;
import com.zcxk.rmcp.core.entity.DeviceCommand;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 
 * @author linqingwei
 * @date 2021-07-20 16:16
 */
@Mapper
public interface DeviceCommandMapper {

    /**
    * 添加数据
    * @author Andy
    * @date 14:51 2021/8/3
    * @param record:
    * @return int
    **/
    int insertSelective(DeviceCommand record);

    /**
    * 更新数据
    * @author Andy
    * @date 14:51 2021/8/3
    * @param record:
    * @return int
    **/
    int updateByPrimaryKeySelective(DeviceCommand record);

    /**
    * 查询阀控集合
    * @author Andy
    * @date 14:51 2021/8/3
    * @param dto:
    * @param query:
    * @return java.util.List<com.zcxk.rmcp.api.vo.DeviceCommandVo>
    **/
    List<DeviceCommandVo> listDeviceCommand(@Param("dto") DeviceCommandPageDto dto, @Param("userCondition") UserCondition query);

    /**
    * 查询阀控
    * @author Andy
    * @date 14:51 2021/8/3
    * @param id:
    * @return com.zcxk.rmcp.api.vo.DeviceCommandVo
    **/
    DeviceCommandVo findDeviceCommand(Long id);

    /**
    * 更新状态
    * @author Andy
    * @date 14:22 2021/8/16
    * @param ids:
    * @param status:
    * @return void
    **/
    void updateStatus(List<Long> ids, Integer status);

}