Commit de8dd3cc authored by suntao's avatar suntao

test

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