Ver código fonte

Merge branch 'feature_v1.0' into develop

tags/V1.0.1^2
chengwang 1 ano atrás
pai
commit
8daff34f2b
2 arquivos alterados com 8 adições e 1 exclusões
  1. +2
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/SendPost.java
  2. +6
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/StartAIService.java

+ 2
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/SendPost.java Ver arquivo

@@ -58,7 +58,8 @@ public class SendPost {
return result.toString();
} catch (Exception e) {
log.error("post请求失败");
return "post请求失败!";
String stringStr = "post请求失败!";
return stringStr;
}
}


+ 6
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/dsp/StartAIService.java Ver arquivo

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.tuoheng.admin.enums.code.inspection.EditInspectionStatusCodeEnum;
import com.tuoheng.admin.entity.request.inspection.MissionStatusRequest;
import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.common.core.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -75,6 +76,11 @@ public class StartAIService {
log.info("调用DSP服务, jsonObject:{}", jsonObject);
String result = SendPost.doPost(url, jsonObject, null);
log.info("调用DSP服务, result:{}", result);
String stringStr = "post请求失败!";
if(result.equals(stringStr)){
log.info("调用dsp服务, 处理post请求失败");
throw new SecurityException("调用dsp服务,处理post请求失败");
}
return JSONObject.parseObject(result);
}


Carregando…
Cancelar
Salvar