时间戳服务

This commit is contained in:
zhangqinbin
2021-04-01 15:12:48 +08:00
parent 100d10fef6
commit 25d834a579

View File

@ -6,10 +6,7 @@ import com.chinaunicom.mall.ebtp.extend.timeService.TimeServiceConstant;
import com.chinaunicom.mall.ebtp.extend.timeService.tsa.TtsAgent;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
@RestController
@ -34,7 +31,7 @@ public class TiemServiceController {
* @return 时间戳对象
*/
@GetMapping(value = "/verifyTimeStamp")
public BaseResponse<TSAVerifyResult> verifyTimeStamp(@ApiParam(value = "时间戳加密原文", required = true) @RequestParam(name = "timestamp") String timestamp) {
public BaseResponse<TSAVerifyResult> verifyTimeStamp(@ApiParam(value = "时间戳加密原文", required = true) @RequestBody @RequestParam(name = "data")String timestamp) {
TimeServiceConstant constant = new TimeServiceConstant();
return BaseResponse.success(constant.verifyTimeStamp(timestamp));
}
@ -44,7 +41,7 @@ public class TiemServiceController {
* @param data 待申请时间戳的原文
* @return 时间戳对象
*/
@GetMapping(value = "/getServiceTimeObj")
@PostMapping(value = "/getServiceTimeObj")
public BaseResponse<TtsAgent.TtsParseResult> getServiceTimeObj(@ApiParam(value = "待申请时间戳的原文", required = true) @RequestParam(name = "data") String data) {
TimeServiceConstant constant = new TimeServiceConstant();
return BaseResponse.success(constant.getServiceTimeObj(data));