tao.mo

调整查询版本号接口为get

mt
2022年11月23日18:32:51
...@@ -27,8 +27,6 @@ public class HsCodeInterface { ...@@ -27,8 +27,6 @@ public class HsCodeInterface {
27 27
28 @Autowired 28 @Autowired
29 IClearApiHsCodeLogService iClearApiHsCodeLogService; 29 IClearApiHsCodeLogService iClearApiHsCodeLogService;
30 - //当前版本号
31 - final String VERSION = "1.3";
32 30
33 @ApiOperation(value = "获取hscode数据", httpMethod = "POST", notes = "ex: http://192.168.1.71:8080/hscode/hscodeRequest") 31 @ApiOperation(value = "获取hscode数据", httpMethod = "POST", notes = "ex: http://192.168.1.71:8080/hscode/hscodeRequest")
34 @PostMapping("/hscodeRequest") 32 @PostMapping("/hscodeRequest")
...@@ -76,12 +74,4 @@ public class HsCodeInterface { ...@@ -76,12 +74,4 @@ public class HsCodeInterface {
76 iClearApiHsCodeLogService.saveIClearApiHsCodeLog(iclearApiHsCodeLog); 74 iClearApiHsCodeLogService.saveIClearApiHsCodeLog(iclearApiHsCodeLog);
77 } 75 }
78 } 76 }
79 -
80 - @ApiOperation(value = "获取当前API版本", httpMethod = "POST", notes = "ex: http://192.168.1.71:8080/hscode/version")
81 - @PostMapping("/version")
82 - @ResponseBody
83 - public String version(HttpServletRequest request) {
84 - String msg = "当前版本号为:" + this.VERSION;
85 - return msg;
86 - }
87 } 77 }
......
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 +}