/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ifish.helper;

import com.ifish.bean.Tbl_Device;
import com.ifish.bean.Tbl_Device_User;
import com.ifish.bean.Tbl_User;
import java.util.List;

/**
 *
 * @author Administrator
 */
public interface DeviceHelperI {

    /**
     * 根据用户Id获取绑定设备集合
     *
     * @param userId
     * @return
     * @throws java.lang.Exception
     */
    List<Tbl_Device_User> getDeviceUsersByUserId(Integer userId) throws Exception;

    /**
     * 根据用户ID和摄像头信息获取用户关联数据
     *
     * @return
     */
    Tbl_Device_User getDeviceUserByUserId_CameraId(Integer userId, String cameraId) throws Exception;

    /**
     * 根据设备Id获取设备详情
     *
     * @param deviceId
     * @return
     * @throws Exception
     */
    Tbl_Device getDeviceById(Integer deviceId) throws Exception;

    /**
     * 根据设备MacAddress获取设备详情
     *
     * @param macAddress
     * @param deviceId
     * @return
     * @throws Exception
     */
    Tbl_Device getDeviceByMacAddress(String macAddress) throws Exception;

    /**
     * 绑定设备
     *
     * @param userId
     * @param mackAddress
     * @return
     */
    Object bindDevice(Integer userId, String mackAddress);

    /**
     * 激活摄像头
     *
     * @param activeCode
     * @param cameraId
     * @return
     */
    Object activeCamera(String activeCode, String cameraId);

    /**
     * 绑定摄像头
     *
     * @param userId
     * @param cameraId
     * @return
     */
    Object bindCamera(Integer userId, String cameraId);

    /**
     * 根据摄像头ID获取设备信息
     *
     * @param cameraId
     * @return
     */
    Tbl_Device getDeviceByCameraId(String cameraId) throws Exception;

    /**
     * 修改设备信息
     *
     * @param device
     * @param userId
     * @return
     */
    Object updateDeviceUser(Tbl_Device_User device);

    /**
     * 修改摄像头信息
     *
     * @param cameraId
     * @param device_User
     * @return
     */
    Object updateCameraUser(Integer cameraId, Tbl_Device_User device_User);

    /**
     * 删除绑定摄像头
     *
     * @param userId
     * @param cameraId
     * @return
     */
    Object deleteCameraUser(Integer userId, String cameraId);

    /**
     * 删除绑定的设备
     *
     * @param deviceUser
     * @return
     */
    Object deleteDeviceUser(Tbl_Device_User deviceUser);

}
