Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cash-loan-flow-boss
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QG
cash-loan-flow-boss
Commits
de8dd3cc
Commit
de8dd3cc
authored
Sep 27, 2019
by
suntao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
65a0cc63
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
TestController.java
.../cashloanflowboss/api/test/controller/TestController.java
+11
-0
JolyneCenter.java
.../quantgroup/cashloanflowboss/spi/jolyne/JolyneCenter.java
+5
-6
No files found.
src/main/java/cn/quantgroup/cashloanflowboss/api/test/controller/TestController.java
View file @
de8dd3cc
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);
}
}
src/main/java/cn/quantgroup/cashloanflowboss/spi/jolyne/JolyneCenter.java
View file @
de8dd3cc
...
...
@@ -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
query
XYQBSQL
(
String
jsonData
);
@PostMapping
(
value
=
"/querySQL/"
+
"${NAMESPACE}"
+
"/
{bdName}
"
,
consumes
=
"application/json"
)
String
query
SQL
(
@PathVariable
(
value
=
"bdName"
)
String
bdName
,
@RequestBody
String
jsonData
);
/**
...
...
@@ -51,10 +49,11 @@ public interface JolyneCenter {
}
@Override
public
String
query
XYQBSQL
(
String
jsonData
)
{
public
String
query
SQL
(
String
bdName
,
String
jsonData
)
{
return
null
;
}
@Override
public
String
executeXYQBUserSQL
(
String
jsonData
)
{
return
null
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment