38 lines
1.0 KiB
Java
38 lines
1.0 KiB
Java
|
|
package com.ruoyi.device.controller;
|
||
|
|
|
||
|
|
import com.ruoyi.common.core.domain.R;
|
||
|
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||
|
|
import com.ruoyi.common.security.annotation.InnerAuth;
|
||
|
|
import com.ruoyi.device.api.domain.AircraftDetailVO;
|
||
|
|
import com.ruoyi.device.service.api.IAircraftService;
|
||
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
import org.springframework.web.bind.annotation.*;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 无人机Controller
|
||
|
|
*
|
||
|
|
* @author ruoyi
|
||
|
|
* @date 2026-01-20
|
||
|
|
*/
|
||
|
|
@RestController
|
||
|
|
@RequestMapping("/aircraft")
|
||
|
|
public class AircraftController extends BaseController
|
||
|
|
{
|
||
|
|
@Autowired
|
||
|
|
private IAircraftService aircraftService;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 查看无人机详情
|
||
|
|
*
|
||
|
|
* @param aircraftId 无人机ID
|
||
|
|
* @return 无人机详情
|
||
|
|
*/
|
||
|
|
@InnerAuth
|
||
|
|
@GetMapping("/detail/{aircraftId}")
|
||
|
|
public R<AircraftDetailVO> getAircraftDetail(@PathVariable("aircraftId") Long aircraftId)
|
||
|
|
{
|
||
|
|
AircraftDetailVO aircraftDetail = aircraftService.getAircraftDetail(aircraftId);
|
||
|
|
return R.ok(aircraftDetail);
|
||
|
|
}
|
||
|
|
}
|