Commit de8dd3cc authored by suntao's avatar suntao

test

parent 65a0cc63
package cn.quantgroup.cashloanflowboss.api.test.controller;
import cn.quantgroup.cashloanflowboss.spi.jolyne.JolyneCenter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/test")
public class TestController {
@Autowired
private JolyneCenter jolyneCenter;
@RequestMapping("sql_test")
public String sqlTest(@RequestBody String sqlData, @RequestParam("dbName") String dbName) {
return "1";
//return jolyneCenter.querySQL(dbName, sqlData);
}
}
......@@ -2,9 +2,7 @@ package cn.quantgroup.cashloanflowboss.spi.jolyne;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.*;
@Component
@FeignClient(name = "JolyneServiceCenter", url = "http://192.168.4.156:9001", fallback = JolyneCenter.Fallback.class)
......@@ -24,8 +22,8 @@ public interface JolyneCenter {
* @param jsonData
* @return
*/
@PostMapping(value = "/querySQL/"+"${NAMESPACE}" + "/xyqb", consumes = "application/json")
String queryXYQBSQL(String jsonData);
@PostMapping(value = "/querySQL/"+"${NAMESPACE}" + "/{bdName}", consumes = "application/json")
String querySQL(@PathVariable(value = "bdName") String bdName , @RequestBody String jsonData);
/**
......@@ -51,10 +49,11 @@ public interface JolyneCenter {
}
@Override
public String queryXYQBSQL(String jsonData) {
public String querySQL(String bdName, String jsonData) {
return null;
}
@Override
public String executeXYQBUserSQL(String jsonData) {
return null;
......
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