Browse Source

重构代码

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
a4283f51a2
3 changed files with 9 additions and 2 deletions
  1. +5
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/constant/SystemConstant.java
  2. +2
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/OnlineIdentifService.java
  3. +2
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateWaittStatusService.java

+ 5
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/constant/SystemConstant.java View File

@@ -29,6 +29,11 @@ public interface SystemConstant {
*/
String API_AIRPORT_EXECUTE_TASK = "/api/airportInterface/executeTask";

/**
* 机场平台:获取天气
*/
String API_AIRPORT_GET_WEATHER = "/api/airportInterface/getWeather";

// 飞手平台不同接口url
/**
* 新增任务接口

+ 2
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/flyer/OnlineIdentifService.java View File

@@ -77,7 +77,8 @@ public class OnlineIdentifService {
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "请选择通道");
}
StreamingDto dto = getLiveStatusService.getLiveStatus(request.getChannelCode());
useLiveChannel(new StreamingDto(request.getChannelCode()));

this.useLiveChannel(new StreamingDto(request.getChannelCode()));

log.info("更新巡检任务状态");
Inspection updateAnalyseStatus = new Inspection();

+ 2
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/update/status/UpdateWaittStatusService.java View File

@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tuoheng.admin.constant.SystemConstant;
import com.tuoheng.admin.entity.Business;
import com.tuoheng.admin.entity.FlightData;
import com.tuoheng.admin.entity.Inspection;
@@ -135,7 +136,7 @@ public class UpdateWaittStatusService {
}

public JsonResult getWeather(String airportUrl, Integer airportId) {
String url = airportUrl + "/api/airportInterface/getWeather";
String url = airportUrl + SystemConstant.API_AIRPORT_GET_WEATHER;
String param = "airportId=" + airportId;
String weatherStr = HttpUtils.sendGet(url, param);
JsonResult jsonResult;

Loading…
Cancel
Save