| | |
| | | package com.ard.web.controller.work; |
| | | |
| | | import com.ard.common.core.controller.BaseController; |
| | | import com.ard.common.core.domain.AjaxResult; |
| | | import com.ard.common.core.page.TableDataInfo; |
| | | import com.ard.work.domain.dto.BoxHistoryDTO; |
| | | import com.ard.work.domain.dto.BoxPhotosDTO; |
| | | import com.ard.work.domain.dto.BoxSettingsDTO; |
| | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | import static com.ard.common.utils.PageUtils.startPage; |
| | | |
| | | /** |
| | | * UavBaseController |
| | | * |
| | |
| | | @ApiSort(value = 2) |
| | | @RequestMapping("/uav/base") |
| | | @RestController |
| | | public class UavBaseController { |
| | | public class UavBaseController extends BaseController { |
| | | |
| | | @Resource |
| | | private ITyService tyService; |
| | | |
| | | @ApiOperation("获取六合token信息") |
| | | @ApiOperationSupport(order = 1) |
| | | @GetMapping("/getToken") |
| | | public AjaxResult getToken() { |
| | | return AjaxResult.success(tyService.getAccessToken()); |
| | | @GetMapping("/getToken/{serverId}") |
| | | public AjaxResult getToken(@PathVariable("serverId") String serverId) { |
| | | return AjaxResult.success(tyService.getAccessToken(serverId)); |
| | | } |
| | | |
| | | @ApiOperation("获取六合盒子列表") |
| | | @ApiOperation("获取全部服务器盒子列表") |
| | | @ApiOperationSupport(order = 2) |
| | | @GetMapping("/getBoxList") |
| | | public AjaxResult getBoxList() { |
| | | List<BoxInfoReceiver> BoxList = tyService.getBoxList(); |
| | | return AjaxResult.success(BoxList); |
| | | List<BoxInfoReceiver> boxList = tyService.getBoxList(); |
| | | return AjaxResult.success(boxList); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("获取飞行历史") |
| | | @ApiOperationSupport(order = 3) |
| | |
| | | } |
| | | |
| | | @ApiOperation("修改云盒设置") |
| | | @ApiOperationSupport(order = 6) |
| | | @PostMapping("/updateBoxSettings") |
| | | public AjaxResult updateBoxSettings(@RequestBody BoxSettingsDTO boxSettingsDTO) { |
| | | Boolean state = tyService.updateBoxSettings(boxSettingsDTO); |
| | | return AjaxResult.success(state); |
| | | } |
| | | |
| | | @ApiOperation("根据[服务器id]获取六合盒子列表") |
| | | @ApiOperationSupport(order = 7) |
| | | @GetMapping("/getBoxSnToList/{id}") |
| | | public TableDataInfo getBoxSnToList(@PathVariable("id") String id) { |
| | | startPage(); |
| | | List<BoxInfoReceiver> boxList = tyService.getBoxSnToList(id); |
| | | return getDataTable(boxList); |
| | | } |
| | | |
| | | } |