李俊

Merge branch 'master-weblogic'

1 +package com.erry.iclear.dateInterface.api;
2 +
3 +import com.erry.iclear.dateInterface.api.request.HsCodeParam;
4 +import com.erry.iclear.dateInterface.api.response.ResultHsCode;
5 +import com.erry.iclear.dateInterface.entity.IClearApiHsCodeLog;
6 +import com.erry.iclear.dateInterface.service.HsCodeService;
7 +import com.erry.iclear.dateInterface.service.IClearApiHsCodeLogService;
8 +import com.erry.iclear.dateInterface.util.StringUtil;
9 +import io.swagger.annotations.ApiOperation;
10 +import lombok.extern.slf4j.Slf4j;
11 +import org.springframework.beans.factory.annotation.Autowired;
12 +import org.springframework.web.bind.annotation.*;
13 +
14 +import javax.servlet.http.HttpServletRequest;
15 +import java.util.Date;
16 +
17 +/**
18 + * @author Administrator
19 + * /hscode/hscodeRequest
20 + */
21 +@RestController
22 +@RequestMapping("/version")
23 +@Slf4j
24 +public class VersionInterface {
25 + //当前版本号
26 + final String VERSION = "1.3";
27 +
28 + @ApiOperation(value = "获取当前API版本", httpMethod = "GET", notes = "ex: http://192.168.1.71:8080/version/version")
29 + @GetMapping("/version")
30 + @ResponseBody
31 + public String version(HttpServletRequest request) {
32 + String msg = "当前API版本号为:" + this.VERSION;
33 + return msg;
34 + }
35 +}
...@@ -114,7 +114,7 @@ public class ApiService { ...@@ -114,7 +114,7 @@ public class ApiService {
114 public void refreshToken(String token) throws Exception{ 114 public void refreshToken(String token) throws Exception{
115 Map<String,String> map = new HashMap<String,String>(); 115 Map<String,String> map = new HashMap<String,String>();
116 map.put("token", token); 116 map.put("token", token);
117 - HttpUtils.doPost(this.refreshTokenUrl,map); 117 + HttpUtils.doProxyPost(this.refreshTokenUrl,map,this.proxyUrl,this.proxyPort);
118 } 118 }
119 119
120 /** 120 /**
...@@ -156,6 +156,7 @@ public class ApiService { ...@@ -156,6 +156,7 @@ public class ApiService {
156 //推送海关回执数据 156 //推送海关回执数据
157 // String json = HttpUtils.doPost(this.customsUrl,objJson,headerMap); 157 // String json = HttpUtils.doPost(this.customsUrl,objJson,headerMap);
158 String json = HttpUtils.doProxyPost(this.customsUrl,objJson,headerMap,this.proxyUrl,this.proxyPort); 158 String json = HttpUtils.doProxyPost(this.customsUrl,objJson,headerMap,this.proxyUrl,this.proxyPort);
159 + log.info("sendCustoms:"+json);
159 //接口响应时间 160 //接口响应时间
160 declearTask.setResponseTime(new Date()); 161 declearTask.setResponseTime(new Date());
161 TokenResult tokenResult = JsonToJava.parseJson(json,TokenResult.class); 162 TokenResult tokenResult = JsonToJava.parseJson(json,TokenResult.class);
......