package com.ard.web.controller.work;
|
|
import com.ard.common.core.domain.AjaxResult;
|
import com.ard.work.domain.dto.speaker.SpeakModeSwitchDTO;
|
import com.ard.work.domain.dto.speaker.StopSpeakDTO;
|
import com.ard.work.domain.dto.speaker.TextSpeakDTO;
|
import com.ard.work.service.ITyService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.annotation.Resource;
|
|
/**
|
* UavSpeakerController
|
*
|
* @author liusuyi
|
* @date 2024年10月21日13:52
|
**/
|
@Api(tags = "无人机喊话器接口")
|
@RequestMapping("/uav/speaker")
|
@RestController
|
public class UavSpeakerController {
|
|
@Resource
|
private ITyService tyService;
|
|
@ApiOperation("喊话模式切换")
|
@PostMapping("/speakModeSwitch")
|
public AjaxResult speakModeSwitch(@RequestBody SpeakModeSwitchDTO speakModeSwitchDTO) {
|
tyService.speakModeSwitch(speakModeSwitchDTO);
|
return AjaxResult.success();
|
}
|
@ApiOperation("文字喊话")
|
@PostMapping("/textSpeak")
|
public AjaxResult textSpeak(@RequestBody TextSpeakDTO textSpeakDTO) {
|
tyService.textSpeak(textSpeakDTO);
|
return AjaxResult.success();
|
}
|
@ApiOperation("停止喊话")
|
@PostMapping("/stopSpeak")
|
public AjaxResult stopSpeak(@RequestBody StopSpeakDTO stopSpeakDTO) {
|
tyService.stopSpeak(stopSpeakDTO);
|
return AjaxResult.success();
|
}
|
|
}
|