|
@@ -1,59 +1,59 @@
|
|
|
-package com.pavis.ai.app.cr.controller;
|
|
|
-
|
|
|
-
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.pavis.ai.app.cr.common.http.ResultBody;
|
|
|
-import com.pavis.ai.app.cr.common.utils.IgnoreUtils;
|
|
|
-import io.swagger.annotations.ApiImplicitParam;
|
|
|
-import io.swagger.annotations.ApiImplicitParams;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.springframework.beans.BeanUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
-
|
|
|
-/**
|
|
|
- * @author guanhuijuan
|
|
|
- * @create 2020-03-04 14:03
|
|
|
- * @desc
|
|
|
- **/
|
|
|
-@Slf4j
|
|
|
-@RestController
|
|
|
-@RequestMapping("/api")
|
|
|
-public class TestController {
|
|
|
-
|
|
|
- // @Autowired
|
|
|
- // private SendService sendService;
|
|
|
-
|
|
|
- @ApiOperation("测试接口1")
|
|
|
- @GetMapping("/cr")
|
|
|
- public ResultBody get() {
|
|
|
- // ResData resData = new ResData();
|
|
|
- // resData.setReqId("01");
|
|
|
- // sendService.send(resData);
|
|
|
- return ResultBody.ok().data(System.currentTimeMillis());
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("测试接口1")
|
|
|
- @PostMapping("/cr/test/{id}")
|
|
|
- @ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "id", value = "唯一标识id", required = false, dataType = "string", paramType = "path")
|
|
|
- })
|
|
|
- public ResultBody testOne(@PathVariable("id") String id) {
|
|
|
- // ResData resData = new ResData();
|
|
|
- // resData.setReqId("01");
|
|
|
- // sendService.send(resData);
|
|
|
- return ResultBody.ok().data(id);
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("测试接口2")
|
|
|
- @PostMapping("/cr/data")
|
|
|
- public ResultBody testTwo(@RequestBody ResultBody resultBody) {
|
|
|
- System.err.println("tes<>"+ JSON.toJSONString(resultBody));
|
|
|
- return ResultBody.ok().data(resultBody);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-}
|
|
|
+// package com.pavis.ai.app.cr.controller;
|
|
|
+//
|
|
|
+//
|
|
|
+// import com.alibaba.fastjson.JSON;
|
|
|
+// import com.alibaba.fastjson.JSONObject;
|
|
|
+// import com.pavis.ai.app.cr.common.http.ResultBody;
|
|
|
+// import com.pavis.ai.app.cr.common.utils.IgnoreUtils;
|
|
|
+// import io.swagger.annotations.ApiImplicitParam;
|
|
|
+// import io.swagger.annotations.ApiImplicitParams;
|
|
|
+// import io.swagger.annotations.ApiOperation;
|
|
|
+// import lombok.extern.slf4j.Slf4j;
|
|
|
+// import org.apache.commons.lang3.StringUtils;
|
|
|
+// import org.springframework.beans.BeanUtils;
|
|
|
+// import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+// import org.springframework.web.bind.annotation.*;
|
|
|
+//
|
|
|
+// /**
|
|
|
+// * @author guanhuijuan
|
|
|
+// * @create 2020-03-04 14:03
|
|
|
+// * @desc
|
|
|
+// **/
|
|
|
+// @Slf4j
|
|
|
+// @RestController
|
|
|
+// @RequestMapping("/api")
|
|
|
+// public class TestController {
|
|
|
+//
|
|
|
+// // @Autowired
|
|
|
+// // private SendService sendService;
|
|
|
+//
|
|
|
+// @ApiOperation("测试接口1")
|
|
|
+// @GetMapping("/cr")
|
|
|
+// public ResultBody get() {
|
|
|
+// // ResData resData = new ResData();
|
|
|
+// // resData.setReqId("01");
|
|
|
+// // sendService.send(resData);
|
|
|
+// return ResultBody.ok().data(System.currentTimeMillis());
|
|
|
+// }
|
|
|
+//
|
|
|
+// @ApiOperation("测试接口1")
|
|
|
+// @PostMapping("/cr/test/{id}")
|
|
|
+// @ApiImplicitParams({
|
|
|
+// @ApiImplicitParam(name = "id", value = "唯一标识id", required = false, dataType = "string", paramType = "path")
|
|
|
+// })
|
|
|
+// public ResultBody testOne(@PathVariable("id") String id) {
|
|
|
+// // ResData resData = new ResData();
|
|
|
+// // resData.setReqId("01");
|
|
|
+// // sendService.send(resData);
|
|
|
+// return ResultBody.ok().data(id);
|
|
|
+// }
|
|
|
+//
|
|
|
+// @ApiOperation("测试接口2")
|
|
|
+// @PostMapping("/cr/data")
|
|
|
+// public ResultBody testTwo(@RequestBody ResultBody resultBody) {
|
|
|
+// System.err.println("tes<>"+ JSON.toJSONString(resultBody));
|
|
|
+// return ResultBody.ok().data(resultBody);
|
|
|
+// }
|
|
|
+//
|
|
|
+//
|
|
|
+// }
|