|
|
@ -4,10 +4,12 @@ import com.bellmann.common.result.Result; |
|
|
|
import com.bellmann.common.result.ResultCode; |
|
|
|
import com.bellmann.common.result.ResultCode; |
|
|
|
import com.bellmann.model.form.AlgForm; |
|
|
|
import com.bellmann.model.form.AlgForm; |
|
|
|
import com.bellmann.model.form.CpeForm; |
|
|
|
import com.bellmann.model.form.CpeForm; |
|
|
|
|
|
|
|
import com.bellmann.model.form.PingForm; |
|
|
|
import com.bellmann.model.query.FaultQuery; |
|
|
|
import com.bellmann.model.query.FaultQuery; |
|
|
|
import com.bellmann.model.vo.FaultBasicInfoVO; |
|
|
|
import com.bellmann.model.vo.FaultBasicInfoVO; |
|
|
|
import com.bellmann.model.vo.FaultDiagnosisResult; |
|
|
|
import com.bellmann.model.vo.FaultDiagnosisResult; |
|
|
|
import com.bellmann.model.vo.FaultQueryVO; |
|
|
|
import com.bellmann.model.vo.FaultQueryVO; |
|
|
|
|
|
|
|
import com.bellmann.plugin.dupsubmit.annotation.PreventDuplicateSubmit; |
|
|
|
import com.bellmann.service.DeviceStaticService; |
|
|
|
import com.bellmann.service.DeviceStaticService; |
|
|
|
import com.bellmann.service.FaultService; |
|
|
|
import com.bellmann.service.FaultService; |
|
|
|
import com.bellmann.service.RemoteOperateTaskService; |
|
|
|
import com.bellmann.service.RemoteOperateTaskService; |
|
|
@ -57,7 +59,7 @@ public class FaultController { |
|
|
|
@GetMapping("/basic_info/service_status") |
|
|
|
@GetMapping("/basic_info/service_status") |
|
|
|
public Result<Map<String,String>> serviceStatus(@RequestParam Long devId, @RequestParam String remote){ |
|
|
|
public Result<Map<String,String>> serviceStatus(@RequestParam Long devId, @RequestParam String remote){ |
|
|
|
// Long taskId = remoteOperateTaskService.sendTaskByDevId(devId, SecurityUtils.getUsername(),remote);
|
|
|
|
// Long taskId = remoteOperateTaskService.sendTaskByDevId(devId, SecurityUtils.getUsername(),remote);
|
|
|
|
Map<String,String> map = faultService.getServiceStatusResult(17675863L); |
|
|
|
Map<String,String> map = faultService.getServiceStatusResult(17675921L); |
|
|
|
return Result.success(map); |
|
|
|
return Result.success(map); |
|
|
|
} |
|
|
|
} |
|
|
|
@Operation(summary = "修改ALG功能") |
|
|
|
@Operation(summary = "修改ALG功能") |
|
|
@ -81,4 +83,16 @@ public class FaultController { |
|
|
|
} |
|
|
|
} |
|
|
|
return Result.failed(ResultCode.THE_INTERFACE_CONNECTION_TIMED_OUT); |
|
|
|
return Result.failed(ResultCode.THE_INTERFACE_CONNECTION_TIMED_OUT); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Operation(summary = "ping一个特定的DNS") |
|
|
|
|
|
|
|
@GetMapping("/ping-dns") |
|
|
|
|
|
|
|
@PreventDuplicateSubmit |
|
|
|
|
|
|
|
public Result<Map<String,String>> pingDns(@RequestParam Long devId, @RequestParam String remote){ |
|
|
|
|
|
|
|
PingForm pingForm = faultService.pingDnsForm(devId); |
|
|
|
|
|
|
|
Long taskId = deviceStaticService.remoteIpPing(pingForm); |
|
|
|
|
|
|
|
Map<String,String> map = faultService.getServiceStatusResult(taskId); |
|
|
|
|
|
|
|
map.put("IP",pingForm.getHost()); |
|
|
|
|
|
|
|
map.put("PackSize",pingForm.getPackSize()); |
|
|
|
|
|
|
|
map.put("Number",pingForm.getPingNumber()); |
|
|
|
|
|
|
|
return Result.success(map); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|