Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nouiWithSpringMVC
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
gechengyang
nouiWithSpringMVC
Commits
9795a4c5
Commit
9795a4c5
authored
Sep 14, 2022
by
WeiCong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.对返回list字段,增加__data后缀配置规则,这样返回的list数据是集合,而不加则返回map(包含data属性和pagenation属性)
parent
6d498c6d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
AbstractCommonController.java
...resentation/noui/controller/AbstractCommonController.java
+7
-0
No files found.
src/main/java/org/sss/presentation/noui/controller/AbstractCommonController.java
View file @
9795a4c5
...
@@ -231,6 +231,11 @@ public abstract class AbstractCommonController {
...
@@ -231,6 +231,11 @@ public abstract class AbstractCommonController {
}
}
private
void
doHandleReturnDataForModuleList
(
Alias
alias
,
String
aliasKey
,
Map
<
String
,
Object
>
dataMap
,
IModuleList
moduleList
,
List
<
Map
>
lst
,
NoUiRequest
noUiRequest
)
{
private
void
doHandleReturnDataForModuleList
(
Alias
alias
,
String
aliasKey
,
Map
<
String
,
Object
>
dataMap
,
IModuleList
moduleList
,
List
<
Map
>
lst
,
NoUiRequest
noUiRequest
)
{
if
(
aliasKey
.
endsWith
(
"__data"
)){
//直接返回结果集
dataMap
.
put
(
aliasKey
,
lst
);
}
else
{
//对该list封装一层,data属性表示实际结果集;pagination属性(分页请求下才有)表示分页信息
Map
<
String
,
Object
>
item
=
new
HashMap
<>();
Map
<
String
,
Object
>
item
=
new
HashMap
<>();
//查询数据
//查询数据
item
.
put
(
Constants
.
DATA
,
lst
);
item
.
put
(
Constants
.
DATA
,
lst
);
...
@@ -254,6 +259,8 @@ public abstract class AbstractCommonController {
...
@@ -254,6 +259,8 @@ public abstract class AbstractCommonController {
}
}
}
}
}
private
Map
<
String
,
Object
>
handleReturnData
(
String
eventType
,
NoUiContext
context
,
NoUiRequest
noUiRequest
,
Alias
alias
)
{
private
Map
<
String
,
Object
>
handleReturnData
(
String
eventType
,
NoUiContext
context
,
NoUiRequest
noUiRequest
,
Alias
alias
)
{
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
// 初始化事件
// 初始化事件
...
...
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