wangmengzhao
2023-12-13 d8228730095cdcaccb40dd2dc290fc44779e340a
wumei-smart-master/springboot/wumei-iot/src/main/java/com/ruoyi/iot/mapper/DeviceMapper.java
@@ -4,22 +4,22 @@
import com.ruoyi.iot.model.*;
import com.ruoyi.iot.model.ThingsModels.ThingsModelValuesInput;
import com.ruoyi.iot.model.ThingsModels.ThingsModelValuesOutput;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
 * 设备Mapper接口
 *
 *
 * @author kerwincui
 * @date 2021-12-16
 */
@Repository
public interface DeviceMapper
{
public interface DeviceMapper {
    /**
     * 查询设备
     *
     *
     * @param deviceId 设备主键
     * @return 设备
     */
@@ -31,6 +31,49 @@
     * @return 设备
     */
    public DeviceStatistic selectDeviceProductAlertCount(Device device);
    /**
     * 查询总设备数(台)
     *
     * @param id
     * @return
     * @throws Exception
     */
    public int selectDeviceCount(int id) throws Exception;
    /**
     * 根据登录用户的id查询设备的使用人数
     *
     * @param id
     * @return
     * @throws Exception
     */
    public int selectUserDeviceByCount(int id) throws Exception;
    /**
     * 根据登录的用户角色查询滤芯寿命清单列表
     *
     * @param device
     * @return
     * @throws Exception
     */
    public List<Device> selectCartridgeLifeList(Device device) throws Exception;
    /**
     * 查询所有的设备
     *
     * @return
     * @throws Exception
     */
    public List<Device> selectDeviceAll() throws Exception;
    /**
     * 根据设备id查询设备
     *
     * @param deviceId 设备主键
     * @return 设备
     */
    public Device selectDeviceById(Long deviceId);
    /**
     * 根据设备编号查询设备
@@ -92,7 +135,7 @@
    /**
     * 查询设备列表
     *
     *
     * @param device 设备
     * @return 设备集合
     */
@@ -131,7 +174,7 @@
    /**
     * 新增设备
     *
     *
     * @param device 设备
     * @return 结果
     */
@@ -139,7 +182,7 @@
    /**
     * 修改设备
     *
     *
     * @param device 设备
     * @return 结果
     */
@@ -161,9 +204,11 @@
     */
    public int updateDeviceBySerialNumber(Device device);
    public int batchUpdateDeviceBySerialNumber(@Param("deviceList") List<Device> deviceList);
    /**
     * 删除设备
     *
     *
     * @param deviceId 设备主键
     * @return 结果
     */
@@ -171,7 +216,7 @@
    /**
     * 批量删除设备
     *
     *
     * @param deviceIds 需要删除的数据主键集合
     * @return 结果
     */
@@ -179,6 +224,7 @@
    /**
     * 查询设备序列号的数量
     *
     * @param deviceNum
     * @return
     */
@@ -186,15 +232,19 @@
    /**
     * 根据设备IDS删除设备分组
     * @param deviceIds
     *
     * @param userDeviceGroupIdModel
     * @return
     */
    public int deleteDeviceGroupByDeviceId(UserIdDeviceIdModel userDeviceGroupIdModel);
    /**
     * 重置设备状态
     *
     * @return 结果
     */
    public int resetDeviceStatus(String deviceNum);
    public int selectDeviceList();
}