package com.ycwl.basic.service.pc;

import com.github.pagehelper.PageInfo;
import com.ycwl.basic.model.pc.device.entity.DeviceConfigEntity;
import com.ycwl.basic.model.pc.device.req.DeviceAddOrUpdateReq;
import com.ycwl.basic.model.pc.device.req.DeviceBatchSortRequest;
import com.ycwl.basic.model.pc.device.req.DeviceReqQuery;
import com.ycwl.basic.model.pc.device.resp.DeviceRespVO;
import com.ycwl.basic.model.wvp.WvpSyncReqVo;
import com.ycwl.basic.utils.ApiResponse;

import java.util.List;

/**
 * @Author：longbinbin
 * @Date：2024/12/2 16:14
 * 设备管理
 */
public interface DeviceService {
    ApiResponse<PageInfo<DeviceRespVO>> pageQuery(DeviceReqQuery deviceReqQuery);
    ApiResponse<List<DeviceRespVO>> list(DeviceReqQuery deviceReqQuery);
    ApiResponse<DeviceRespVO> getById(Long id);
    ApiResponse addOrUpdate(DeviceAddOrUpdateReq deviceReqQuery);
    ApiResponse deleteById(Long id);
    ApiResponse updateStatus(Long id);

    DeviceConfigEntity getConfig(Long id);
    void saveConfig(Long configId, DeviceConfigEntity config);

    void updateDevices(Long scenicId, WvpSyncReqVo reqVo);

    ApiResponse<Boolean> sortDevice(Long deviceId, Long afterDeviceId);

    ApiResponse<Boolean> batchSort(Long scenicId, DeviceBatchSortRequest request);
}
