diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/config/ConfigurerAdapter.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/config/ConfigurerAdapter.java index 08a29d3..a39effe 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/config/ConfigurerAdapter.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/config/ConfigurerAdapter.java @@ -3,15 +3,10 @@ package com.ningdatech.pmapi.common.config; import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.support.config.FastJsonConfig; import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter; -import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; -import org.springframework.web.cors.CorsConfiguration; -import org.springframework.web.cors.UrlBasedCorsConfigurationSource; -import org.springframework.web.filter.CorsFilter; import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import java.nio.charset.StandardCharsets; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/controller/TestController.java b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/controller/TestController.java index 1ee799d..16ea46e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/controller/TestController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/controller/TestController.java @@ -1,5 +1,6 @@ package com.ningdatech.pmapi.provincial.controller; +import com.ningdatech.basic.model.ApiResponse; import com.ningdatech.pmapi.projectdeclared.manage.ReviewByProvincialDeptManage; import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.provincial.model.dto.ProvincialProjectDTO; @@ -39,7 +40,7 @@ public class TestController { @GetMapping("/detail") @ApiOperation("测试获取详情") - private String detail(@RequestParam String projectId){ + private ApiResponse detail(@RequestParam String projectId){ return joinReviewProvincialBureauService.processInfo(projectId); } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/IJoinReviewProvincialBureauService.java b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/IJoinReviewProvincialBureauService.java index 900bd7f..32a5999 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/IJoinReviewProvincialBureauService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/IJoinReviewProvincialBureauService.java @@ -1,5 +1,6 @@ package com.ningdatech.pmapi.provincial.service; +import com.ningdatech.basic.model.ApiResponse; import com.ningdatech.pmapi.provincial.model.dto.ProvincialProjectDTO; /** @@ -21,5 +22,5 @@ public interface IJoinReviewProvincialBureauService { * 查看 本区域 省局联审 的项目审核详情 * @return */ - String processInfo(String projectId); + ApiResponse processInfo(String projectId); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java index 1004b79..e99a0eb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java @@ -78,13 +78,13 @@ public class JoinReviewProvincialBureauServiceImpl implements IJoinReviewProvinc * @return */ @Override - public String processInfo(String projectId) { + public ApiResponse processInfo(String projectId) { Long timeStamp = System.currentTimeMillis()/1000; String url = provincialProperties.getHost() + provincialProperties.getDetailUrl() + "?timestamp=" + timeStamp; log.info("省局获取审核详情 url {}",url); - ResponseEntity responseEntity = null; + ResponseEntity responseEntity = null; String signature = getSha256(timeStamp,provincialProperties.getDetailUrl(), HttpMethod.POST.name()); @@ -100,7 +100,7 @@ public class JoinReviewProvincialBureauServiceImpl implements IJoinReviewProvinc .body(projectId); //也可以是DTO try { - responseEntity = restTemplate.exchange(requestEntity,String.class); + responseEntity = restTemplate.exchange(requestEntity,ApiResponse.class); log.info("获取审批详情 响应 :{}",responseEntity); } catch (Exception e) { log.error("[省局获取审核详情] http request error", e);