| | |
| | | import com.ard.work.component.forest.TyClient; |
| | | import com.ard.work.component.netty.TyTcpClientManager; |
| | | import com.ard.work.domain.dto.TokenDTO; |
| | | import com.ard.work.domain.entity.ArdDroneInfo; |
| | | 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.ArdDroneInfoMapper; |
| | | import com.ard.work.mapper.ArdServerInfoMapper; |
| | | import com.ard.work.service.IArdServerInfoService; |
| | | import com.dtflys.forest.exceptions.ForestRuntimeException; |
| | |
| | | public class ArdServerInfoServiceImpl implements IArdServerInfoService { |
| | | |
| | | @Resource |
| | | private ArdServerInfoMapper ardServerInfoMapper; |
| | | @Resource |
| | | private TyClient tyClient; |
| | | |
| | | @Resource |
| | | private ArdServerInfoMapper ardServerInfoMapper; |
| | | |
| | | @Resource |
| | | private TyTcpClientManager tyTcpClientManager; |
| | | |
| | | @Resource |
| | | private ArdDroneInfoMapper ArdDroneInfoMapper; |
| | | |
| | | /** |
| | | * 查询服务器管理 |
| | |
| | | @Override |
| | | @DataScope(deptAlias = "d", userAlias = "u") |
| | | public List<ArdServerInfo> selectArdServerInfoList(ArdServerInfo ardServerInfo) { |
| | | return ardServerInfoMapper.selectArdServerInfoList(ardServerInfo); |
| | | } |
| | | |
| | | @Override |
| | | @DataScope(deptAlias = "d", userAlias = "u") |
| | | public List<ArdServerInfo> selectArdServerInfoListNo(ArdServerInfo ardServerInfo) { |
| | | |
| | | // List<ArdDroneInfo> ardDroneInfos = ArdDroneInfoMapper.selectArdDroneList(new ArdDroneInfo()); |
| | | // for (ArdDroneInfo ardDroneInfo : ardDroneInfos) { |
| | | // ardDroneInfo.getBoxSn(); |
| | | // } |
| | | // List<ArdServerInfo> servers = ardServerInfoMapper.selectArdServerInfoList(ardServerInfo); |
| | | // for (ArdServerInfo server : servers) { |
| | | // for (ArdDroneInfo ardDroneInfo : server.getArdDroneInfoList()) { |
| | | // ardDroneInfo.getBoxSn(); |
| | | // } |
| | | // } |
| | | |
| | | return ardServerInfoMapper.selectArdServerInfoList(ardServerInfo); |
| | | } |
| | | |
| | |
| | | .encryptStr(getEncryptStr(serverInfo, timeStamp)) |
| | | .timeStamp(timeStamp) |
| | | .build(); |
| | | // try { |
| | | TyHttpCommonReceiver<AccessTokenReceiver> getTokenRes = tyClient.getToken(id, gtd); |
| | | return getTokenRes.getContent(); |
| | | // try { |
| | | TyHttpCommonReceiver<AccessTokenReceiver> getTokenRes = tyClient.getToken(id, gtd); |
| | | return getTokenRes.getContent(); |
| | | // } catch (Exception e) { |
| | | // log.error("获取 Token 失败 serverId={}, 异常: {}", id, e.getMessage()); |
| | | // return null; // 请求失败返回 null |