package com.xy.service;

import com.xy.annotate.RestMappingController;
import com.xy.dto.DeviceStatusDto;
import com.xy.utils.R;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <p>
 * 设备-状态 服务类
 * </p>
 *
 * @author lijin
 * @since 2022-12-23
 */
@RestMappingController("device-status")
public interface DeviceStatusService {

    /**
     * 上报信息
     *
     * @param up
     * @return
     */
    @PostMapping("up")
    R up(@RequestBody @Validated DeviceStatusDto.Up up);

    /**
     * 开关门
     *
     * @param door
     * @return
     */
    @PostMapping("door")
    R door(@RequestBody @Validated DeviceStatusDto.Door door);

    /**
     * 更新网络状态
     *
     * @param dto dto
     * @return {@link R}
     */
    @PostMapping("updateNetState")
    R updateNetState(@RequestBody @Validated DeviceStatusDto.UpdateNetState dto);
}
