package com.ard.web.controller.work;
|
|
import com.ard.common.core.domain.AjaxResult;
|
import com.ard.work.domain.dto.speaker.StrobeLightDTO;
|
import com.ard.work.service.ITyService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import javax.annotation.Resource;
|
|
/**
|
* UavSpeakerController
|
*
|
* @author liusuyi
|
* @date 2024年10月21日13:52
|
**/
|
@Api(tags = "无人机爆闪灯接口")
|
@RequestMapping("/uav/strobelight")
|
@RestController
|
public class UavStrobeLightController {
|
|
@Resource
|
private ITyService tyService;
|
|
@ApiOperation("开启爆闪灯")
|
@PostMapping("/open")
|
public AjaxResult turnOnLight(@RequestBody StrobeLightDTO strobeLightDTO) {
|
tyService.turnOnLight();
|
return AjaxResult.success();
|
}
|
|
@ApiOperation("关闭爆闪灯")
|
@PostMapping("/close")
|
public AjaxResult turnOffLight(@RequestBody StrobeLightDTO strobeLightDTO) {
|
tyService.turnOffLight();
|
return AjaxResult.success();
|
}
|
|
@ApiOperation("亮度调节")
|
@PostMapping("/adjustBrightness")
|
public AjaxResult adjustBrightness(@RequestBody StrobeLightDTO strobeLightDTO) {
|
tyService.adjustBrightness();
|
return AjaxResult.success();
|
}
|
|
}
|