
package com.seer.teach.iot.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.seer.teach.common.response.OssImageUploadResp;
import com.seer.teach.iot.common.resp.IsBindDeviceResp;
import com.seer.teach.iot.module.entity.UserDevicesEntity;
import org.apache.tomcat.util.http.fileupload.FileUploadException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Captain
 * @since 2025-05-08
 */
public interface UserDevicesService extends IService<UserDevicesEntity> {


    /**
     * Author: Captain
     * Desc:   通过设备ID获取UserId
     * Params: [deviceId]
     * Return: java.lang.Integer
     * Time: 2025/7/3 16:23
     */
    Integer getUserIdByDeviceId(Integer deviceId);

    /**
     * Author: Captain
     * Desc:   通过userId获取DeviceId
     * Params: [userId]
     * Return: java.lang.Integer
     * Time: 2025/7/4 10:32
     */
    Integer getDeviceIdByUserId(Integer userId);

    boolean bindDevice(Integer userId, Integer deviceId);
}
