|
@@ -9,14 +9,13 @@ import com.css.simulation.resource.common.configuration.algPlatform.ClientDetail
|
|
|
import com.fasterxml.jackson.databind.JsonNode;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import lombok.SneakyThrows;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
-@Controller
|
|
|
+@RestController
|
|
|
@RequestMapping("/algPlatform")
|
|
|
public class AlgorithmPlatformController {
|
|
|
|
|
@@ -29,13 +28,11 @@ public class AlgorithmPlatformController {
|
|
|
private ClientDetail clientDetail;
|
|
|
|
|
|
@RequestMapping("/getAlgorithmList")
|
|
|
- @ResponseBody
|
|
|
- @SneakyThrows
|
|
|
public ResponseBodyVO<String> getAlgorithmList(@RequestBody String param) {
|
|
|
//取得token
|
|
|
String token = getToken();
|
|
|
if (ObjectUtil.isNull(token)) {
|
|
|
- return new ResponseBodyVO<>(ResponseBodyVO.Response.SERVER_FAILURE, "获取算法平台token失败!");
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.SERVER_FAILURE, "获取算法平台token失败。");
|
|
|
}
|
|
|
String algorithmListUri = clientDetail.getAlgorithmListUri() + "?access_token=" + token + param;
|
|
|
String result = HttpUtil.get(HttpUtil.getHttpClient(), HttpUtil.getRequestConfig(), algorithmListUri);
|
|
@@ -43,7 +40,6 @@ public class AlgorithmPlatformController {
|
|
|
}
|
|
|
|
|
|
@RequestMapping("/selectAlgorithmNameByAlgorithmId")
|
|
|
- @ResponseBody
|
|
|
@SneakyThrows
|
|
|
public ResponseBodyVO<String> selectAlgorithmNameByAlgorithmId(@RequestBody String algorithmId) {
|
|
|
//取得token
|