Commit 137b5933 by jx-art

测试接口提交~

parent 4db9a951
......@@ -104,16 +104,19 @@ public class ChangeConfigController {
@Autowired
private GoodsRpcService goodsRpcService;
@GetMapping("/test")
public AjaxResult test(@RequestParam("id")Integer id){
return AjaxResult.of(1111,"调用成功",goodsRpcService.getDetail(id));
public String test(@RequestParam("id")Integer id){
String detail = goodsRpcService.getDetail(id);
JSONObject jsonObject = JSONObject.parseObject(detail);
GoodsResponseSqePO data = jsonObject.getObject("data", GoodsResponseSqePO.class);
return data.getUserName();
}
@GetMapping("/test1")
public String test1(@RequestParam("id")Integer id){
public Object test1(@RequestParam("id")Integer id){
String detail = goodsRpcService.getDetail(id);
JSONObject jsonObject = JSONObject.parseObject(detail);
GoodsResponseSqePO data = (GoodsResponseSqePO) jsonObject.get("data");
return data.getUserName();
Object data = jsonObject.get("data");
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