Commit 137b5933 by jx-art

测试接口提交~

parent 4db9a951
...@@ -104,16 +104,19 @@ public class ChangeConfigController { ...@@ -104,16 +104,19 @@ public class ChangeConfigController {
@Autowired @Autowired
private GoodsRpcService goodsRpcService; private GoodsRpcService goodsRpcService;
@GetMapping("/test") @GetMapping("/test")
public AjaxResult test(@RequestParam("id")Integer id){ public String test(@RequestParam("id")Integer id){
return AjaxResult.of(1111,"调用成功",goodsRpcService.getDetail(id)); String detail = goodsRpcService.getDetail(id);
JSONObject jsonObject = JSONObject.parseObject(detail);
GoodsResponseSqePO data = jsonObject.getObject("data", GoodsResponseSqePO.class);
return data.getUserName();
} }
@GetMapping("/test1") @GetMapping("/test1")
public String test1(@RequestParam("id")Integer id){ public Object test1(@RequestParam("id")Integer id){
String detail = goodsRpcService.getDetail(id); String detail = goodsRpcService.getDetail(id);
JSONObject jsonObject = JSONObject.parseObject(detail); JSONObject jsonObject = JSONObject.parseObject(detail);
GoodsResponseSqePO data = (GoodsResponseSqePO) jsonObject.get("data"); Object data = jsonObject.get("data");
return data.getUserName(); return data;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment