Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
iClear-api
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
李俊
2022-12-05 10:15:33 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
2290ebbc78471d413f33673356290704112a2dd1
2290ebbc
2 parents
dffcb7d1
9dd161e5
Merge branch 'master-weblogic'
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletions
src/main/java/com/erry/iclear/dateInterface/api/VersionInterface.java
src/main/java/com/erry/iclear/dateInterface/service/ApiService.java
src/main/java/com/erry/iclear/dateInterface/api/VersionInterface.java
0 → 100644
View file @
2290ebb
package
com
.
erry
.
iclear
.
dateInterface
.
api
;
import
com.erry.iclear.dateInterface.api.request.HsCodeParam
;
import
com.erry.iclear.dateInterface.api.response.ResultHsCode
;
import
com.erry.iclear.dateInterface.entity.IClearApiHsCodeLog
;
import
com.erry.iclear.dateInterface.service.HsCodeService
;
import
com.erry.iclear.dateInterface.service.IClearApiHsCodeLogService
;
import
com.erry.iclear.dateInterface.util.StringUtil
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Date
;
/**
* @author Administrator
* /hscode/hscodeRequest
*/
@RestController
@RequestMapping
(
"/version"
)
@Slf4j
public
class
VersionInterface
{
//当前版本号
final
String
VERSION
=
"1.3"
;
@ApiOperation
(
value
=
"获取当前API版本"
,
httpMethod
=
"GET"
,
notes
=
"ex: http://192.168.1.71:8080/version/version"
)
@GetMapping
(
"/version"
)
@ResponseBody
public
String
version
(
HttpServletRequest
request
)
{
String
msg
=
"当前API版本号为:"
+
this
.
VERSION
;
return
msg
;
}
}
src/main/java/com/erry/iclear/dateInterface/service/ApiService.java
View file @
2290ebb
...
...
@@ -114,7 +114,7 @@ public class ApiService {
public
void
refreshToken
(
String
token
)
throws
Exception
{
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"token"
,
token
);
HttpUtils
.
doP
ost
(
this
.
refreshTokenUrl
,
map
);
HttpUtils
.
doP
roxyPost
(
this
.
refreshTokenUrl
,
map
,
this
.
proxyUrl
,
this
.
proxyPort
);
}
/**
...
...
@@ -156,6 +156,7 @@ public class ApiService {
//推送海关回执数据
// String json = HttpUtils.doPost(this.customsUrl,objJson,headerMap);
String
json
=
HttpUtils
.
doProxyPost
(
this
.
customsUrl
,
objJson
,
headerMap
,
this
.
proxyUrl
,
this
.
proxyPort
);
log
.
info
(
"sendCustoms:"
+
json
);
//接口响应时间
declearTask
.
setResponseTime
(
new
Date
());
TokenResult
tokenResult
=
JsonToJava
.
parseJson
(
json
,
TokenResult
.
class
);
...
...
Please
register
or
login
to post a comment