| | |
| | | import com.dy.common.mw.protocol.p206V202404.ProtocolConstantV206V202404; |
| | | import com.dy.common.mw.protocol.p206V202404.downVos.ComCdXyVo; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpHeaders; |
| | |
| | | response = restTemplate.exchange(url, HttpMethod.GET, httpEntity, BaseResponse.class); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return BaseResponseUtils.buildError("后端系统出错,中间件调用异常"); |
| | | } |
| | | return response.getBody(); |
| | | if(response == null){ |
| | | return BaseResponseUtils.buildError("后端系统出错,中间件调用异常"); |
| | | }else{ |
| | | return response.getBody(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | response = restTemplate.exchange(url, HttpMethod.POST, httpEntity, BaseResponse.class); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return BaseResponseUtils.buildError("后端系统出错,中间件调用异常"); |
| | | } |
| | | return response.getBody(); |
| | | if(response == null){ |
| | | return BaseResponseUtils.buildError("后端系统出错,中间件调用异常"); |
| | | }else{ |
| | | return response.getBody(); |
| | | } |
| | | } |
| | | |
| | | } |