ard-admin/src/main/java/com/ard/web/controller/data/ArdMapManagementController.java
@@ -3,7 +3,7 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import com.ard.system.domain.data.ArdMapManagement; import com.ard.system.data.domain.ArdMapManagement; import com.ard.system.service.data.IArdMapManagementService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -42,7 +42,7 @@ * 查询地图管理列表 */ @ApiOperation("查询地图管理列表") @PreAuthorize("@ss.hasPermi('system:management:list')") @PreAuthorize("@ss.hasPermi('system:map:list')") @GetMapping("/list") public TableDataInfo list(ArdMapManagement ardMapManagement) { startPage(); @@ -54,7 +54,7 @@ * 导出地图管理列表 */ @ApiOperation("导出地图管理列表") @PreAuthorize("@ss.hasPermi('system:management:export')") @PreAuthorize("@ss.hasPermi('system:map:export')") @Log(title = "地图管理", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ArdMapManagement ardMapManagement) { @@ -67,7 +67,7 @@ * 获取地图管理详细信息 */ @ApiOperation("获取地图管理详细信息") @PreAuthorize("@ss.hasPermi('system:management:query')") @PreAuthorize("@ss.hasPermi('system:map:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") String id) { return success(ardMapManagementService.selectArdMapManagementById(id)); @@ -77,7 +77,7 @@ * 新增地图管理 */ @ApiOperation("新增地图管理") @PreAuthorize("@ss.hasPermi('system:management:add')") @PreAuthorize("@ss.hasPermi('system:map:add')") @Log(title = "地图管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ArdMapManagement ardMapManagement) { @@ -88,7 +88,7 @@ * 修改地图管理 */ @ApiOperation("修改地图管理") @PreAuthorize("@ss.hasPermi('system:management:edit')") @PreAuthorize("@ss.hasPermi('system:map:edit')") @Log(title = "地图管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ArdMapManagement ardMapManagement) { @@ -99,7 +99,7 @@ * 删除地图管理 */ @ApiOperation("删除地图管理") @PreAuthorize("@ss.hasPermi('system:management:remove')") @PreAuthorize("@ss.hasPermi('system:map:remove')") @Log(title = "地图管理", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable String[] ids) { ard-admin/src/main/java/com/ard/web/controller/data/ArdModelManagementController.java
@@ -42,7 +42,7 @@ * 查询模型管理列表 */ @ApiOperation("查询模型管理列表") @PreAuthorize("@ss.hasPermi('system:management:list')") @PreAuthorize("@ss.hasPermi('system:model:list')") @GetMapping("/list") public TableDataInfo list(ArdModelManagement ardModelManagement) { startPage(); @@ -54,7 +54,7 @@ * 导出模型管理列表 */ @ApiOperation("导出模型管理列表") @PreAuthorize("@ss.hasPermi('system:management:export')") @PreAuthorize("@ss.hasPermi('system:model:export')") @Log(title = "模型管理", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ArdModelManagement ardModelManagement) { @@ -67,7 +67,7 @@ * 获取模型管理详细信息 */ @ApiOperation("获取模型管理详细信息") @PreAuthorize("@ss.hasPermi('system:management:query')") @PreAuthorize("@ss.hasPermi('system:model:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") String id) { return success(ardModelManagementService.selectArdModelManagementById(id)); @@ -77,7 +77,7 @@ * 新增模型管理 */ @ApiOperation("新增模型管理") @PreAuthorize("@ss.hasPermi('system:management:add')") @PreAuthorize("@ss.hasPermi('system:model:add')") @Log(title = "模型管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ArdModelManagement ardModelManagement) { @@ -88,7 +88,7 @@ * 修改模型管理 */ @ApiOperation("修改模型管理") @PreAuthorize("@ss.hasPermi('system:management:edit')") @PreAuthorize("@ss.hasPermi('system:model:edit')") @Log(title = "模型管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ArdModelManagement ardModelManagement) { @@ -99,7 +99,7 @@ * 删除模型管理 */ @ApiOperation("删除模型管理") @PreAuthorize("@ss.hasPermi('system:management:remove')") @PreAuthorize("@ss.hasPermi('system:model:remove')") @Log(title = "模型管理", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable String[] ids) { ard-admin/src/main/java/com/ard/web/controller/data/ArdTileManagementController.java
@@ -42,7 +42,7 @@ * 查询tile管理列表 */ @ApiOperation("查询tile管理列表") @PreAuthorize("@ss.hasPermi('system:management:list')") @PreAuthorize("@ss.hasPermi('system:tile:list')") @GetMapping("/list") public TableDataInfo list(ArdTileManagement ardTileManagement) { startPage(); @@ -54,7 +54,7 @@ * 导出tile管理列表 */ @ApiOperation("导出tile管理列表") @PreAuthorize("@ss.hasPermi('system:management:export')") @PreAuthorize("@ss.hasPermi('system:tile:export')") @Log(title = "tile管理", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ArdTileManagement ardTileManagement) { @@ -67,7 +67,7 @@ * 获取tile管理详细信息 */ @ApiOperation("获取tile管理详细信息") @PreAuthorize("@ss.hasPermi('system:management:query')") @PreAuthorize("@ss.hasPermi('system:tile:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") String id) { return success(ardTileManagementService.selectArdTileManagementById(id)); @@ -77,7 +77,7 @@ * 新增tile管理 */ @ApiOperation("新增tile管理") @PreAuthorize("@ss.hasPermi('system:management:add')") @PreAuthorize("@ss.hasPermi('system:tile:add')") @Log(title = "tile管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ArdTileManagement ardTileManagement) { @@ -88,7 +88,7 @@ * 修改tile管理 */ @ApiOperation("修改tile管理") @PreAuthorize("@ss.hasPermi('system:management:edit')") @PreAuthorize("@ss.hasPermi('system:tile:edit')") @Log(title = "tile管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ArdTileManagement ardTileManagement) { @@ -99,7 +99,7 @@ * 删除tile管理 */ @ApiOperation("删除tile管理") @PreAuthorize("@ss.hasPermi('system:management:remove')") @PreAuthorize("@ss.hasPermi('system:tile:remove')") @Log(title = "tile管理", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable String[] ids) { ard-admin/src/main/java/com/ard/web/controller/work/ArdDroneInfoController.java
File was renamed from ard-admin/src/main/java/com/ard/web/controller/work/ArdDroneController.java @@ -5,7 +5,7 @@ import com.ard.common.utils.poi.ExcelUtil; import com.ard.work.domain.entity.ArdDroneInfo; import com.ard.work.service.IArdDroneService; import com.ard.work.service.IArdDroneInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; @@ -33,20 +33,20 @@ @Api(tags = "无人机管理接口") @RestController @RequestMapping("/uav/drone") public class ArdDroneController extends BaseController { public class ArdDroneInfoController extends BaseController { @Autowired private IArdDroneService ardDroneService; private IArdDroneInfoService ardDroneInfoService; /** * 查询无人机管理列表 */ @ApiOperation("查询无人机管理列表") @PreAuthorize("@ss.hasPermi('system:management:list')") @PreAuthorize("@ss.hasPermi('work:drone:list')") @GetMapping("/list") public TableDataInfo list(ArdDroneInfo ardDroneInfo) { startPage(); List<ArdDroneInfo> list = ardDroneService.selectArdDroneList(ardDroneInfo); List<ArdDroneInfo> list = ardDroneInfoService.selectArdDroneList(ardDroneInfo); return getDataTable(list); } @@ -54,11 +54,11 @@ * 导出无人机管理列表 */ @ApiOperation("导出无人机管理列表") @PreAuthorize("@ss.hasPermi('system:management:export')") @PreAuthorize("@ss.hasPermi('work:drone:export')") @Log(title = "无人机管理", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ArdDroneInfo ardDroneInfo) { List<ArdDroneInfo> list = ardDroneService.selectArdDroneList(ardDroneInfo); List<ArdDroneInfo> list = ardDroneInfoService.selectArdDroneList(ardDroneInfo); ExcelUtil<ArdDroneInfo> util = new ExcelUtil<ArdDroneInfo>(ArdDroneInfo.class); util.exportExcel(response, list, "无人机管理数据"); } @@ -67,43 +67,43 @@ * 获取无人机管理详细信息 */ @ApiOperation("获取无人机管理详细信息") @PreAuthorize("@ss.hasPermi('system:management:query')") @PreAuthorize("@ss.hasPermi('work:drone:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") String id) { return success(ardDroneService.selectArdDroneById(id)); return success(ardDroneInfoService.selectArdDroneById(id)); } /** * 新增无人机管理 */ @ApiOperation("新增无人机管理") @PreAuthorize("@ss.hasPermi('system:management:add')") @PreAuthorize("@ss.hasPermi('work:drone:add')") @Log(title = "无人机管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ArdDroneInfo ardDroneInfo) { return toAjax(ardDroneService.insertArdDrone(ardDroneInfo)); return toAjax(ardDroneInfoService.insertArdDrone(ardDroneInfo)); } /** * 修改无人机管理 */ @ApiOperation("修改无人机管理") @PreAuthorize("@ss.hasPermi('system:management:edit')") @PreAuthorize("@ss.hasPermi('work:drone:edit')") @Log(title = "无人机管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ArdDroneInfo ardDroneInfo) { return toAjax(ardDroneService.updateArdDrone(ardDroneInfo)); return toAjax(ardDroneInfoService.updateArdDrone(ardDroneInfo)); } /** * 删除无人机管理 */ @ApiOperation("删除无人机管理") @PreAuthorize("@ss.hasPermi('system:management:remove')") @PreAuthorize("@ss.hasPermi('work:drone:remove')") @Log(title = "无人机管理", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable String[] ids) { return toAjax(ardDroneService.deleteArdDroneByIds(ids)); return toAjax(ardDroneInfoService.deleteArdDroneByIds(ids)); } } ard-admin/src/main/java/com/ard/web/controller/work/ArdServerInfoController.java
File was renamed from ard-admin/src/main/java/com/ard/web/controller/work/ArdServerController.java @@ -4,7 +4,7 @@ import javax.servlet.http.HttpServletResponse; import com.ard.work.domain.entity.ArdServerInfo; import com.ard.work.service.IArdServerService; import com.ard.work.service.IArdServerInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; @@ -33,20 +33,20 @@ @Api(tags = "服务器管理接口") @RestController @RequestMapping("/uav/server") public class ArdServerController extends BaseController { public class ArdServerInfoController extends BaseController { @Autowired private IArdServerService ardServerManagementService; private IArdServerInfoService ardServerInfoService; /** * 查询服务器管理列表 */ @ApiOperation("查询服务器管理列表") @PreAuthorize("@ss.hasPermi('system:management:list')") @PreAuthorize("@ss.hasPermi('work:server:list')") @GetMapping("/list") public TableDataInfo list(ArdServerInfo ardServerInfo) { startPage(); List<ArdServerInfo> list = ardServerManagementService.selectArdServerManagementList(ardServerInfo); List<ArdServerInfo> list = ardServerInfoService.selectArdServerInfoList(ardServerInfo); return getDataTable(list); } @@ -54,11 +54,11 @@ * 导出服务器管理列表 */ @ApiOperation("导出服务器管理列表") @PreAuthorize("@ss.hasPermi('system:management:export')") @PreAuthorize("@ss.hasPermi('work:server:export')") @Log(title = "服务器管理", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ArdServerInfo ardServerInfo) { List<ArdServerInfo> list = ardServerManagementService.selectArdServerManagementList(ardServerInfo); List<ArdServerInfo> list = ardServerInfoService.selectArdServerInfoList(ardServerInfo); ExcelUtil<ArdServerInfo> util = new ExcelUtil<ArdServerInfo>(ArdServerInfo.class); util.exportExcel(response, list, "服务器管理数据"); } @@ -67,43 +67,43 @@ * 获取服务器管理详细信息 */ @ApiOperation("获取服务器管理详细信息") @PreAuthorize("@ss.hasPermi('system:management:query')") @PreAuthorize("@ss.hasPermi('work:server:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") String id) { return success(ardServerManagementService.selectArdServerManagementById(id)); return success(ardServerInfoService.selectArdServerInfoById(id)); } /** * 新增服务器管理 */ @ApiOperation("新增服务器管理") @PreAuthorize("@ss.hasPermi('system:management:add')") @PreAuthorize("@ss.hasPermi('work:server:add')") @Log(title = "服务器管理", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ArdServerInfo ardServerInfo) { return toAjax(ardServerManagementService.insertArdServerManagement(ardServerInfo)); return toAjax(ardServerInfoService.insertArdServerInfo(ardServerInfo)); } /** * 修改服务器管理 */ @ApiOperation("修改服务器管理") @PreAuthorize("@ss.hasPermi('system:management:edit')") @PreAuthorize("@ss.hasPermi('work:server:edit')") @Log(title = "服务器管理", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ArdServerInfo ardServerInfo) { return toAjax(ardServerManagementService.updateArdServerManagement(ardServerInfo)); return toAjax(ardServerInfoService.updateArdServerInfo(ardServerInfo)); } /** * 删除服务器管理 */ @ApiOperation("删除服务器管理") @PreAuthorize("@ss.hasPermi('system:management:remove')") @PreAuthorize("@ss.hasPermi('work:server:remove')") @Log(title = "服务器管理", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable String[] ids) { return toAjax(ardServerManagementService.deleteArdServerManagementByIds(ids)); return toAjax(ardServerInfoService.deleteArdServerInfoByIds(ids)); } } ard-system/src/main/java/com/ard/system/authorize/common/AuthorizeUtil.java
File was renamed from ard-system/src/main/java/com/ard/system/common/AuthorizeUtil.java @@ -1,4 +1,4 @@ package com.ard.system.common; package com.ard.system.authorize.common; import lombok.extern.slf4j.Slf4j; import org.apache.commons.codec.binary.Hex; ard-system/src/main/java/com/ard/system/domain/data/ArdMapManagement.java
@@ -1,4 +1,4 @@ package com.ard.system.domain.data; package com.ard.system.data.domain; import com.ard.common.annotation.Excel; import com.ard.common.core.domain.BaseEntity; ard-system/src/main/java/com/ard/system/mapper/data/ArdMapManagementMapper.java
@@ -1,6 +1,6 @@ package com.ard.system.mapper.data; import com.ard.system.domain.data.ArdMapManagement; import com.ard.system.data.domain.ArdMapManagement; import java.util.List; ard-system/src/main/java/com/ard/system/service/data/IArdMapManagementService.java
@@ -1,6 +1,6 @@ package com.ard.system.service.data; import com.ard.system.domain.data.ArdMapManagement; import com.ard.system.data.domain.ArdMapManagement; import java.util.List; ard-system/src/main/java/com/ard/system/service/data/impl/ArdMapManagementServiceImpl.java
@@ -1,14 +1,14 @@ package com.ard.system.service.data.impl; import java.util.List; import com.ard.common.utils.uuid.IdUtils; import com.ard.system.domain.data.ArdMapManagement; import com.ard.system.data.domain.ArdMapManagement; import com.ard.system.mapper.data.ArdMapManagementMapper; import com.ard.system.service.data.IArdMapManagementService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * 地图管理Service业务层处理 * ard-system/src/main/resources/mapper/noflyzone/ArdNoFlyZoneMapper.xml
File was renamed from ard-system/src/main/resources/mapper/data/ArdNoFlyZoneMapper.xml @@ -15,7 +15,14 @@ </resultMap> <sql id="selectArdNoFlyZoneVo"> select id, name, geojson, create_by, create_time, update_by, update_time from ard_no_fly_zone select id, name, geojson, create_by, create_time, update_by, update_time from ard_no_fly_zone </sql> <select id="selectArdNoFlyZoneList" parameterType="ArdNoFlyZone" resultMap="ArdNoFlyZoneResult"> ard-work/src/main/java/com/ard/work/component/forest/MyAddressSource.java
@@ -1,7 +1,7 @@ package com.ard.work.component.forest; import com.ard.work.domain.entity.ArdServerInfo; import com.ard.work.service.IArdServerService; import com.ard.work.service.IArdServerInfoService; import com.dtflys.forest.callback.AddressSource; import com.dtflys.forest.http.ForestAddress; import com.dtflys.forest.http.ForestRequest; @@ -13,7 +13,7 @@ public class MyAddressSource implements AddressSource { @Resource private IArdServerService ardServerService; private IArdServerInfoService ardServerService; @Override public ForestAddress getAddress(ForestRequest request) { String serverKey = request.varAsString("serverId"); ard-work/src/main/java/com/ard/work/component/forest/TokenInterceptor.java
@@ -1,7 +1,7 @@ package com.ard.work.component.forest; import com.ard.work.domain.receiver.AccessTokenReceiver; import com.ard.work.service.IArdServerService; import com.ard.work.service.IArdServerInfoService; import com.dtflys.forest.http.ForestRequest; import com.dtflys.forest.interceptor.Interceptor; import lombok.extern.slf4j.Slf4j; @@ -12,7 +12,7 @@ @Slf4j public class TokenInterceptor<T> implements Interceptor<T> { @Resource private IArdServerService ardServerService; private IArdServerInfoService ardServerService; /** * 该方法在请求发送之前被调用, 若返回false则不会继续发送请求 ard-work/src/main/java/com/ard/work/component/netty/TyTcpClientManager.java
@@ -7,7 +7,7 @@ import com.ard.work.component.netty.handler.MessageProtocolEncoder; import com.ard.work.domain.cache.TyTcpServerCache; import com.ard.work.domain.entity.ArdServerInfo; import com.ard.work.service.IArdServerService; import com.ard.work.service.IArdServerInfoService; import io.netty.bootstrap.Bootstrap; import io.netty.channel.*; import io.netty.channel.nio.NioEventLoopGroup; @@ -36,7 +36,7 @@ private final EventLoopGroup eventLoopGroup = new NioEventLoopGroup(); @Resource private IArdServerService ardServerService; // ← 从数据库读取边缘服务器配置 private IArdServerInfoService ardServerService; // ← 从数据库读取边缘服务器配置 @Resource private ClientHandler clientHandler; ard-work/src/main/java/com/ard/work/mapper/ArdServerInfoMapper.java
@@ -17,7 +17,7 @@ * @param id 服务器管理主键 * @return 服务器管理 */ public ArdServerInfo selectArdServerManagementById(String id); public ArdServerInfo selectArdServerInfoById(String id); /** * 查询服务器管理列表 @@ -25,7 +25,7 @@ * @param ardServerInfo 服务器管理 * @return 服务器管理集合 */ public List<ArdServerInfo> selectArdServerManagementList(ArdServerInfo ardServerInfo); public List<ArdServerInfo> selectArdServerInfoList(ArdServerInfo ardServerInfo); /** * 新增服务器管理 @@ -33,7 +33,7 @@ * @param ardServerInfo 服务器管理 * @return 结果 */ public int insertArdServerManagement(ArdServerInfo ardServerInfo); public int insertArdServerInfo(ArdServerInfo ardServerInfo); /** * 修改服务器管理 @@ -41,7 +41,7 @@ * @param ardServerInfo 服务器管理 * @return 结果 */ public int updateArdServerManagement(ArdServerInfo ardServerInfo); public int updateArdServerInfo(ArdServerInfo ardServerInfo); /** * 删除服务器管理 @@ -49,7 +49,7 @@ * @param id 服务器管理主键 * @return 结果 */ public int deleteArdServerManagementById(String id); public int deleteArdServerInfoById(String id); /** * 批量删除服务器管理 @@ -57,5 +57,5 @@ * @param ids 需要删除的数据主键集合 * @return 结果 */ public int deleteArdServerManagementByIds(String[] ids); public int deleteArdServerInfoByIds(String[] ids); } ard-work/src/main/java/com/ard/work/service/IArdDroneInfoService.java
File was renamed from ard-work/src/main/java/com/ard/work/service/IArdDroneService.java @@ -12,7 +12,7 @@ * @author ruoyi * @date 2025-03-04 */ public interface IArdDroneService { public interface IArdDroneInfoService { /** * 查询无人机盒子 ard-work/src/main/java/com/ard/work/service/IArdServerInfoService.java
File was renamed from ard-work/src/main/java/com/ard/work/service/IArdServerService.java @@ -10,7 +10,7 @@ * @author xia * @date 2025-10-10 */ public interface IArdServerService { public interface IArdServerInfoService { /** * 查询服务器管理 @@ -18,7 +18,7 @@ * @param id 服务器管理主键 * @return 服务器管理 */ public ArdServerInfo selectArdServerManagementById(String id); public ArdServerInfo selectArdServerInfoById(String id); /** * 查询服务器管理列表 @@ -26,7 +26,7 @@ * @param ardServerInfo 服务器管理 * @return 服务器管理集合 */ public List<ArdServerInfo> selectArdServerManagementList(ArdServerInfo ardServerInfo); public List<ArdServerInfo> selectArdServerInfoList(ArdServerInfo ardServerInfo); /** * 新增服务器管理 @@ -34,7 +34,7 @@ * @param ardServerInfo 服务器管理 * @return 结果 */ public int insertArdServerManagement(ArdServerInfo ardServerInfo); public int insertArdServerInfo(ArdServerInfo ardServerInfo); /** * 修改服务器管理 @@ -42,7 +42,7 @@ * @param ardServerInfo 服务器管理 * @return 结果 */ public int updateArdServerManagement(ArdServerInfo ardServerInfo); public int updateArdServerInfo(ArdServerInfo ardServerInfo); /** * 批量删除服务器管理 @@ -50,7 +50,7 @@ * @param ids 需要删除的服务器管理主键集合 * @return 结果 */ public int deleteArdServerManagementByIds(String[] ids); public int deleteArdServerInfoByIds(String[] ids); /** * 删除服务器管理信息 @@ -58,7 +58,7 @@ * @param id 服务器管理主键 * @return 结果 */ public int deleteArdServerManagementById(String id); public int deleteArdServerInfoById(String id); /** * 根据 id 获取 token ard-work/src/main/java/com/ard/work/service/impl/ArdDroneInfoServiceImpl.java
File was renamed from ard-work/src/main/java/com/ard/work/service/impl/ArdDroneServiceImpl.java @@ -5,8 +5,8 @@ import com.ard.work.domain.entity.ArdDroneInfo; import com.ard.work.domain.receiver.BoxInfoReceiver; import com.ard.work.mapper.ArdDroneInfoMapper; import com.ard.work.service.IArdDroneInfoService; import com.ard.work.service.ITyService; import com.ard.work.service.IArdDroneService; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; @@ -23,7 +23,7 @@ * @date 2025-03-04 */ @Service public class ArdDroneServiceImpl implements IArdDroneService { public class ArdDroneInfoServiceImpl implements IArdDroneInfoService { @Resource private ArdDroneInfoMapper ArdDroneInfoMapper; ard-work/src/main/java/com/ard/work/service/impl/ArdServerInfoServiceImpl.java
File was renamed from ard-work/src/main/java/com/ard/work/service/impl/ArdServerServiceImpl.java @@ -3,15 +3,13 @@ import com.ard.common.utils.uuid.IdUtils; import com.ard.work.component.forest.TyClient; import com.ard.work.component.netty.TyTcpClientManager; import com.ard.work.domain.cache.TyTcpServerCache; import com.ard.work.domain.dto.TokenDTO; import com.ard.work.domain.entity.ArdServerInfo; import com.ard.work.domain.receiver.AccessTokenReceiver; import com.ard.work.domain.receiver.TyHttpCommonReceiver; import com.ard.work.mapper.ArdServerInfoMapper; import com.ard.work.service.IArdServerService; import com.ard.work.service.IArdServerInfoService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.DigestUtils; @@ -27,7 +25,7 @@ */ @Slf4j @Service public class ArdServerServiceImpl implements IArdServerService { public class ArdServerInfoServiceImpl implements IArdServerInfoService { @Resource private ArdServerInfoMapper ardServerInfoMapper; @@ -43,8 +41,8 @@ * @return 服务器管理 */ @Override public ArdServerInfo selectArdServerManagementById(String id) { return ardServerInfoMapper.selectArdServerManagementById(id); public ArdServerInfo selectArdServerInfoById(String id) { return ardServerInfoMapper.selectArdServerInfoById(id); } /** @@ -54,8 +52,8 @@ * @return 服务器管理 */ @Override public List<ArdServerInfo> selectArdServerManagementList(ArdServerInfo ardServerInfo) { return ardServerInfoMapper.selectArdServerManagementList(ardServerInfo); public List<ArdServerInfo> selectArdServerInfoList(ArdServerInfo ardServerInfo) { return ardServerInfoMapper.selectArdServerInfoList(ardServerInfo); } /** @@ -65,9 +63,9 @@ * @return 结果 */ @Override public int insertArdServerManagement(ArdServerInfo ardServerInfo) { public int insertArdServerInfo(ArdServerInfo ardServerInfo) { ardServerInfo.setId(IdUtils.fastUUID()); int i = ardServerInfoMapper.insertArdServerManagement(ardServerInfo); int i = ardServerInfoMapper.insertArdServerInfo(ardServerInfo); if (i > 0) { tyTcpClientManager.connectServer(ardServerInfo); } @@ -81,8 +79,8 @@ * @return 结果 */ @Override public int updateArdServerManagement(ArdServerInfo ardServerInfo) { int i = ardServerInfoMapper.updateArdServerManagement(ardServerInfo); public int updateArdServerInfo(ArdServerInfo ardServerInfo) { int i = ardServerInfoMapper.updateArdServerInfo(ardServerInfo); if (i > 0) { tyTcpClientManager.connectServer(ardServerInfo); } @@ -96,8 +94,8 @@ * @return 结果 */ @Override public int deleteArdServerManagementByIds(String[] ids) { int i = ardServerInfoMapper.deleteArdServerManagementByIds(ids); public int deleteArdServerInfoByIds(String[] ids) { int i = ardServerInfoMapper.deleteArdServerInfoByIds(ids); if (i > 0) { for (String id : ids) { //移除tcp连接 @@ -114,8 +112,8 @@ * @return 结果 */ @Override public int deleteArdServerManagementById(String id) { return ardServerInfoMapper.deleteArdServerManagementById(id); public int deleteArdServerInfoById(String id) { return ardServerInfoMapper.deleteArdServerInfoById(id); } /** @@ -125,7 +123,7 @@ public AccessTokenReceiver getAccessToken(String id) { long timeStamp = getTimeStamp(); AccessTokenReceiver accessToken = null; ArdServerInfo serverInfo = selectArdServerManagementById(id); ArdServerInfo serverInfo = selectArdServerInfoById(id); // 准备请求的json TokenDTO gtd = TokenDTO.builder() .accessKeyId(serverInfo.getAccessKeyId()) ard-work/src/main/java/com/ard/work/service/impl/TyServiceImpl.java
@@ -3,8 +3,6 @@ import com.ard.common.utils.ByteUtils; import com.ard.work.aspect.annotation.CheckTakeoffAltitude; import com.ard.work.aspect.annotation.CheckControlRight; import com.ard.work.component.netty.TcpClientSession; import com.ard.work.component.netty.TyTcpClientManager; import com.ard.work.component.netty.command.BaseCmd; import com.ard.work.component.netty.command.camera.*; import com.ard.work.component.netty.command.manual.*; @@ -47,14 +45,13 @@ import com.ard.work.component.netty.command.real.UavTelemetryDataCmd; import com.ard.work.component.netty.handler.ErrorCodeEnum; import com.ard.work.component.netty.protobuf.TelemetryDataPB; import com.ard.work.service.IArdDroneService; import com.ard.work.service.IArdServerService; import com.ard.work.service.IArdDroneInfoService; import com.ard.work.service.IArdServerInfoService; import com.ard.work.service.ITyService; import com.ard.work.domain.message.UavControlType; import io.netty.channel.Channel; import io.netty.channel.ChannelFuture; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -78,9 +75,9 @@ @Service public class TyServiceImpl implements ITyService { @Resource private IArdServerService ardServerService; private IArdServerInfoService ardServerService; @Resource private IArdDroneService ardDroneService; private IArdDroneInfoService ardDroneService; @Resource private TyClient tyClient; ard-work/src/main/resources/mapper/ArdServerInfoMapper.xml
@@ -20,7 +20,7 @@ <result property="serverStatus" column="server_status" /> </resultMap> <sql id="selectArdServerManagementVo"> <sql id="selectArdServerInfoVo"> select c.id, c.server_name, c.host, @@ -39,8 +39,8 @@ left join sys_user u on u.user_id = c.user_id </sql> <select id="selectArdServerManagementList" parameterType="ArdServerInfo" resultMap="ArdServerManagementResult"> <include refid="selectArdServerManagementVo"/> <select id="selectArdServerInfoList" parameterType="ArdServerInfo" resultMap="ArdServerInfoResult"> <include refid="selectArdServerInfoVo"/> <where> <if test="id != null and id != ''"> and c.id = #{id}</if> <if test="serverName != null and serverName != ''"> and server_name like c.concat('%', #{serverName}, '%')</if> @@ -55,12 +55,12 @@ </where> </select> <select id="selectArdServerManagementById" parameterType="String" resultMap="ArdServerManagementResult"> <include refid="selectArdServerManagementVo"/> <select id="selectArdServerInfoById" parameterType="String" resultMap="ArdServerInfoResult"> <include refid="selectArdServerInfoVo"/> where c.id = #{id} </select> <insert id="insertArdServerManagement" parameterType="ArdServerInfo"> <insert id="insertArdServerInfo" parameterType="ArdServerInfo"> insert into ard_server_info <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null">id,</if> @@ -94,7 +94,7 @@ </trim> </insert> <update id="updateArdServerManagement" parameterType="ArdServerInfo"> <update id="updateArdServerInfo" parameterType="ArdServerInfo"> update ard_server_info <trim prefix="SET" suffixOverrides=","> <if test="serverName != null">server_name = #{serverName},</if> @@ -113,11 +113,11 @@ where id = #{id} </update> <delete id="deleteArdServerManagementById" parameterType="String"> <delete id="deleteArdServerInfoById" parameterType="String"> delete from ard_server_info where id = #{id} </delete> <delete id="deleteArdServerManagementByIds" parameterType="String"> <delete id="deleteArdServerInfoByIds" parameterType="String"> delete from ard_server_info where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id}