Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-cloud
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data-hook
gic-cloud
Commits
3b7f519a
Commit
3b7f519a
authored
Nov 19, 2021
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
取数平台调整
parent
686a8ed2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
FreeQueryController.java
...java/com/gic/cloud/data/hook/web/FreeQueryController.java
+17
-3
No files found.
gic-cloud-data-hook/src/main/java/com/gic/cloud/data/hook/web/FreeQueryController.java
View file @
3b7f519a
...
...
@@ -196,18 +196,32 @@ public class FreeQueryController {
start
=
sql
.
indexOf
(
"LIMIT"
)
+
6
;
}
curLimit
=
sql
.
substring
(
start
);
if
(
curLimit
.
indexOf
(
","
)
>
0
){
curLimit
=
curLimit
.
substring
(
curLimit
.
indexOf
(
","
)+
1
);
int
i
=
curLimit
.
indexOf
(
","
);
if
(
i
>
0
){
curLimit
=
curLimit
.
substring
(
i
+
1
);
if
(
Integer
.
parseInt
(
curLimit
.
trim
())
>
1000
){
curLimit
=
1000
+
""
;
}
if
(
Integer
.
valueOf
(
curLimit
)
>
1000
){
sql
=
sql
.
substring
(
0
,
start
+
i
+
1
)
+
" "
+
curLimit
;
}
else
{
if
(
Integer
.
parseInt
(
curLimit
.
trim
())
>
1000
){
curLimit
=
1000
+
""
;
}
sql
=
sql
.
substring
(
0
,
start
)
+
" "
+
curLimit
;
}
}
else
{
sql
=
sql
+
" limit "
+
curLimit
;
}
}
return
sql
;
}
public
static
void
main
(
String
[]
args
)
{
String
sql
=
"SELECT * FROM tab_gic_store limit 10000"
;
String
s
=
new
FreeQueryController
().
parseSql
(
sql
);
System
.
out
.
println
(
"s = "
+
s
);
}
/** 获取指定表明的所有字段
* @param tableName
* @param request
...
...
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