Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
8dad2129
Commit
8dad2129
authored
Nov 06, 2023
by
chenzai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分页查询修改方法参数,sql语句适配国产数据库
parent
bd8fb147
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
IdxBizSyncController.java
...amos/boot/module/cas/controller/IdxBizSyncController.java
+5
-4
IdxBizSyncServiceImpl.java
...s/boot/module/cas/service/impl/IdxBizSyncServiceImpl.java
+1
-1
No files found.
amos-boot-system-cas/amos-boot-module-cas-biz/src/main/java/com/yeejoin/amos/boot/module/cas/controller/IdxBizSyncController.java
View file @
8dad2129
...
...
@@ -28,10 +28,11 @@ public class IdxBizSyncController {
@RequestMapping
(
value
=
"/page/{tableName}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表分页查询"
,
notes
=
"列表分页查询"
)
@ResponseBody
public
List
listPage
(
@PathVariable
String
tableName
,
@RequestParam
(
value
=
"current"
,
defaultValue
=
"1"
)
int
current
,
@RequestParam
(
value
=
"size"
,
defaultValue
=
"10"
)
int
size
,
@RequestBody
Map
params
)
throws
Exception
{
public
List
listPage
(
@PathVariable
String
tableName
,
@RequestParam
Map
params
)
throws
Exception
{
int
current
=
Integer
.
parseInt
((
String
)
params
.
get
(
"current"
));
int
size
=
Integer
.
parseInt
((
String
)
params
.
get
(
"size"
));
params
.
remove
(
"current"
);
params
.
remove
(
"size"
);
List
list
=
idxBizSyncService
.
selectAllPageQuery
(
tableName
,
params
,
current
,
size
);
return
list
;
}
...
...
amos-boot-system-cas/amos-boot-module-cas-biz/src/main/java/com/yeejoin/amos/boot/module/cas/service/impl/IdxBizSyncServiceImpl.java
View file @
8dad2129
...
...
@@ -34,7 +34,7 @@ public class IdxBizSyncServiceImpl extends BaseService<IdxBizXnzsDto, IdxBizXnzs
Iterator
<
Map
.
Entry
<
String
,
Object
>>
it
=
params
.
entrySet
().
iterator
();
while
(
it
.
hasNext
())
{
Map
.
Entry
<
String
,
Object
>
entry
=
it
.
next
();
sql
=
sql
+
entry
.
getKey
()
+
" = "
+
"'"
+
entry
.
getValue
()
+
"'"
+
" AND "
;
sql
=
sql
+
"\""
+
entry
.
getKey
()
+
"\""
+
" = "
+
"'"
+
entry
.
getValue
()
+
"'"
+
" AND "
;
}
sql
+=
"1 = 1 "
;
sql
+=
" limit "
+
(
current
-
1
)
*
size
+
","
+
size
;
...
...
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